Digital Signing Core

Full reference for hash signing, RSA/EC algorithms, detached and attached signatures, batch signing, and timestamps.

All features supported

Every digital signing capability listed below is implemented and working on Mobile App and Desktop Software. Hash signing is the foundation for PDF, XML, CMS, and custom document workflows.

Overview

Digital signing core signs a pre-computed document hash with the private key on the DSC token. The portal computes the hash server-side; SecureSign performs the cryptographic operation after PIN verification.

  • Detached — returns raw signatureBase64 (portal attaches to document).
  • Attached — returns CMS/PKCS#7 envelope containing signature + certificate.
  • Timestamp — optional TSA counter-signature for long-term validity.

Platform Support

FeatureMobile AppDesktop SoftwareREST API
Sign HashDeep linkDeep linkPOST /sign/hash (orchestration)
Verify SignatureProduct + APIREST APIPOST /verify/hash
RSA SigningDefaultDefaultRSA-SHA256
SHA256 / SHA384 / SHA512hashAlgohashAlgohashAlgo
Detached SignatureSupporteddetached: truedetached: true
Attached Signature (CMS)Supportedattached: trueattached: true
Batch SigningMultiple deep linksSession reusePOST /sign/batch
Bulk SigningPortal workflowSession reusePOST /sign/batch
Timestamp SupportTSA integrationtimestamp: truetimestamp: true

Request Fields

FieldTypeRequiredDescription
hashBase64stringYesBase64-encoded document hash
hashAlgostringYesSHA256, SHA384, or SHA512
certSerialstringNoPre-select certificate by serial
detachedbooleanNoReturn raw signature (default true)
attachedbooleanNoReturn CMS envelope (default false)
timestampbooleanNoRequest TSA timestamp (default false)
callbackUrlstringREST onlyServer callback after mobile signing
platformstringREST onlymobile_browser or desktop_software

Algorithms

hashAlgoSignature algorithmUse case
SHA256SHA256withRSADefault — GST, MCA, general signing
SHA384SHA384withRSAHigher security requirements
SHA512SHA512withRSAPolicy-mandated SHA-512

Batch Signing

Sign multiple hashes in one PIN session. User enters PIN once; SecureSign signs each item sequentially.

{"items":[{"requestId":"r1","hashBase64":"..."},{"requestId":"r2","hashBase64":"..."}],"callbackUrl":"https://portal.example.gov.in/callback"}

Examples

window.location.href = `securesign://sign?requestId=${id}&hashBase64=${hash}&hashAlgo=SHA256&callbackUrl=${callback}&apiKey=${apiKey}`;

Attached CMS signature

Pass attached: true and timestamp: true via deep link query parameters or REST API body. See Deep Link Protocol.

securesign://sign?requestId={uuid}&hashBase64={hash}&hashAlgo=SHA256&documentType=hash&attached=true&timestamp=true&callbackUrl={url}&apiKey={key}

Response

Detached signature

{"success":true,"signatureBase64":"MEUCIQD...","algorithm":"SHA256withRSA","certificate":{"subjectCN":"Rajesh Kumar","serialNumber":"4A3B2C1D"}}

Attached CMS with timestamp

{"success":true,"cmsBase64":"MIIG...","timestampToken":"MIID...","algorithm":"SHA256withRSA"}

Batch response

{"success":true,"results":[{"requestId":"r1","signatureBase64":"MEUCIQD..."},{"requestId":"r2","signatureBase64":"MEUCIQE..."}]}

Errors

CodeCauseResolution
SS_HASH_INVALIDMalformed or unsupported hashVerify base64 encoding and algorithm match
SS_ALGO_NOT_SUPPORTEDUnsupported hashAlgoUse SHA256, SHA384, or SHA512
SS_PIN_INVALIDIncorrect PINUser retries PIN entry
SS_SIGN_CANCELLEDUser cancelledRe-initiate sign flow
SS_TSA_UNAVAILABLETimestamp authority unreachableRetry or sign without timestamp

See also Signing API — POST /sign/hash.