digital signature & esign overview

36
Digital Signature & eSign (An Overview) e-Hastakshar (eSign) Workshop for Application Service Providers (ASP) 17-18 December, 2015 Rishi Pathak – C-DAC

Upload: rishi-pathak

Post on 12-Jan-2017

25 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Digital signature & eSign overview

Digital Signature & eSign(An Overview)

e-Hastakshar (eSign) Workshop for Application Service Providers (ASP)17-18 December, 2015

Rishi Pathak – C-DAC

Page 2: Digital signature & eSign overview

Outline of Talk

• What are Digital Signatures• Cryptographic hash functions• Asymmetric cryptography• PKI & DSC• PKCS#7• eSign

Page 3: Digital signature & eSign overview

Introduction

• Digital Signatures are synonymous to handwritten signature or stamped seal

• Mathematical technique for validating– Authenticity and integrity of a message, software

or digital document

• Gained legal validity as per Indian IT Act 2000

Page 4: Digital signature & eSign overview

Paper Signatures v/s Digital Signatures

Properties Paper Electronic

Authenticity May be forged Cannot be copied

Integrity Signature independent of the document

Signature depends on the contents of the document

Non-repudiation • Handwriting expert needed

• Error prone

• Any computer user• Error free

Page 5: Digital signature & eSign overview

PKCS & X509 Standards• PKCS 1 :

– Properties and format of RSA key pairs– Algorithms for encryption/decryption, signing/verification

• PKCS 7– Cryptographic Message Syntax (CMS) Standard

• PKCS 10– Certificate Signing Request (CSR) Syntax Standard

• PKCS 9 : Extended attributes for CMS and CSR– Signing Time, NONCE, Sequence, Counter Signature– DOB, Certificate Extensions, Name, Gender, Name & Address etc.

• X509 version 3 and 2 : – Digital Signature Certificate(DSC), Certificate Revocation List(CRL)

• PKCS 11 : Cryptographic Token Interface Standard– An API for signing and verifying data by a device that holds the key

(Hardware Tokens, HSM)

Page 6: Digital signature & eSign overview

Associations in Digital Signature

• Document content :: Hash (Digital fingerprint)• Hash :: Private key (Secret)• Private key :: Public key (Known to everyone)• Public key :: Certificate (Identity)• Certificate :: CA (Trusted third party)• CA :: RCAI (Root Certificate Authority of INDIA)

Page 7: Digital signature & eSign overview

Building Blocks

• Cryptographic hash functions– Integrity

• Asymmetric cryptography– Authentication

• PKI (Public Key Infrastructure)– Identity – Non repudiation

Page 8: Digital signature & eSign overview

Cryptographic Hash Functions• Uniquely maps data of arbitrary size onto a fixed length

string• Iterative one way compression • Use cases : password, hash tables, caches, finding

duplicate records etc. • Uses in cryptography - HMAC & Digital Signatures • Properties

– Pre-image resistance : Infeasible to generate a message from its hash

– Second pre-image resistance : Given a hash, difficult to find another message with same hash

– Collision resistance : No two different messages with same hash

Page 9: Digital signature & eSign overview

Symmetric Cryptography

• Same key is used for encryption and decryption

• Challenge– Key distribution – Key management

• Non Repudiation ?

Page 10: Digital signature & eSign overview

Public Key Cryptography

• Employs asymmetric(mathematically related) keys(key pairs) for encryption and decryption

• RSA, DSA, ECDSA• Key used to encrypt differs from key to be

used for decryption • Encryption using Public key• Signing using Private key

Page 11: Digital signature & eSign overview

Public Key Cryptography

• Strength lies in computational impracticality in deducing Private key from Public key

• Security lies in protecting Private key • Uses include Public key encryption and Digital

Signatures• Computational complexity limits usage for short

messages • Also used in hand shaking for secure exchange of

symmetric keys in SSL/TLS

Page 12: Digital signature & eSign overview

Signing & Verification- Flow

Page 13: Digital signature & eSign overview

Signing & Verification- Example

Page 14: Digital signature & eSign overview

Public Key Infrastructure

• PKI – Public Key Infrastructure ecosystem is an intersection of:• Cryptography (Math) – Cryptographers/Researchers • Technology & Implementation – PKI System Developer• Policy & Law – PKI System & Users

Page 15: Digital signature & eSign overview

• Application • Subject Authentication• Certificate Generation

• Certificate Distribution• Certificate Revocation

PKI - Registration/Certification

Page 16: Digital signature & eSign overview

Certificate Authority• Certifying authority is an entity which issues Digital Certificate • It is a Trusted third party• CA’s are the important characteristics of Public Key

Infrastructure (PKI)Responsibilities of CA• Verify the credentials of the person requesting for the

certificate (RA’s responsibility)• Issue certificates• Revoke certificate• Generate and upload CRL• Maintain & update certificate repository• Make available Certification Practice Statement

Page 17: Digital signature & eSign overview

PKI - India• Strictly hierarchal trust path model

• CCA operates Root Certificate Authority of India(self signed certificate)• Only one level of sub Certifying Authorities(max 4 certs a chain)

• Necessitates issuance of end entity certificates only through its sub-CA

Page 18: Digital signature & eSign overview

Digital Signature Certificate

A Public Key Certificate is an electronic document used to prove ownership of a public key. The certificate includes :• Information about its owner's identity(Subject), • Information about the key, • The Digital Signature of an entity that has verified

the certificate's contents are correct(Issuer CA in PKI)

Page 19: Digital signature & eSign overview

X.509

X509 is ITU-T standard for PKIDefines formats for:• Digital Certificates – Version3• CRL – Version 2• Certificate Path Validation• Distinguished Name

Page 20: Digital signature & eSign overview

X.509 v3 Certificate

• Version (3)• Serial Number• Signature Algorithm

Identifier• Issuer Name• Validity Period

• Not before• Not after

• Subject Name

• Subject Public Key Information• Public key algorithm• Subject public key

• Optional Fields• Extensions(optional)

Page 21: Digital signature & eSign overview

C-DAC CA Certificate

Page 22: Digital signature & eSign overview

X.509 v3 CertificateClass of certificate : “Aadhaar-eKYC – OTP”Mandatorily included in the Subject

Varying Pseudonym guarantees unique Subject for same Aadhaar holder

Page 23: Digital signature & eSign overview
Page 24: Digital signature & eSign overview

X.509 v3 ExtensionAssociate additional information for subjects, public keys and certificate revocation lists

• Extension type• Extension value• Criticality indicator

Key Usage(Critical) : Digital Signatures, Non RepudiationCRL distribution pointsCertificate PoliciesCertification Practice Statement(CPS)

Page 25: Digital signature & eSign overview
Page 26: Digital signature & eSign overview

PKCS#7

• Specifies a syntax for digital envelopes and digital signatures

• Widely used in many applications for enveloping and authenticating messages, and for distribution of certificates and certificate revocation lists

• PKCS#7 Content-Type : SignedData for Digital Signatures

Page 27: Digital signature & eSign overview

Abstract Syntax Notation 11. The rules of syntax for describing the contents of a

message in terms of data type and content sequence or structure

2. How you actually encode each data item in a message – BER & DER(Identifier-Length-Content), XER etc.

Age ::= INTEGER (0..7)User ::= SEQUENCE { name IA5String (SIZE(1..128)), age Age, address IA5String OPTIONAL,

}

Data Types : BOOLEAN, INTEGER, BIT STRING, OCTET STRING, NULL, REAL, ENUMERATED, GeneralizedTime, IA5String, UTF8StringConstructors : SEQUENCE, SET

Page 28: Digital signature & eSign overview

PKCS#7 - SignedData

Supports multiple signers/signatures

Page 29: Digital signature & eSign overview

PKCS#7 - SignerInfos

Page 30: Digital signature & eSign overview

PKCS#7

What is Digested and Signed• RAW• Hash of the message• Does not contain information on DigestAlgorithm

• PKCS#7• EncryptedDigest ASN1 structure• Contains both hash & DigestAlgorithm• AuthenticatedAttributes in case they are present

Page 31: Digital signature & eSign overview

PKCS#7 - EncryptedDigest

ASN1 Definition of EncryptedDigest

ASN1 Parse of Decrypted EncryptedDigest

Page 32: Digital signature & eSign overview

PKCS#7 – SigningTime

• AuthenticatedAttributes DER encoded ASN1 structure is digested

• This forms an association of message & signing time with the signature

AuthenticatedAttributes include • SigningTime• MessageDigest and other attributes

Page 33: Digital signature & eSign overview

PKCS#7 - Signatures Types1. Single signature

– One signer and his/her signature on a document2. Parallel signature

– Multiple signer and their signature on a document3. Counter signature

– Hierarchy of signatures – UnauthenticatedAttributes contains SignerInfos for counter signer– Signature is on EncryptedDigest of previous signer– Recursive in nature

Signature container may OR may not include content on which digital signature was created4. Attached PKCS#7 signature5. Detached PKCS#7 signature

Page 34: Digital signature & eSign overview

Without eSignSubscriber :• Application to CA for DSC (soft/hard mode)• Key generation and safe custody(iToken, Smart card)

PKI :• Manual verification of credentials (VA)• Issuance & communication of DSC

Limited by :• Not online• Time taken for ascertaining subscribers identity• Key management, accessibility and cost

Mass adoption and integration with services

Page 35: Digital signature & eSign overview

eSignElectronic Authentication Techniques & Procedure Rules, 2015

- Legal validity to authentication & eKYC using Aadhaar

eSign facilitates Digital Signatures by an Aadhaar holder– Registered & active mobile number is a

prerequisite– OTP and Biometric authentication methods– eKYC treated as verified PoI and PoA

(Registration)

Page 36: Digital signature & eSign overview

Thank YouQ/A