Public-Key Cryptography Standards #15

Format utilisé par Up ! Security Manager

Le format Public-Key Cryptography Standards #15 (PKCS#15) du laboratoire Rsa spécifie l'interface avec un périphérique renfermant les clés privées.

La norme utilisée utilisée est Abstract Syntax Notation One (ASN.1) de l'International Telecommunication Union (ITU) compilée en Basic Encoding Rules (BER).

Le principe de cette Application Program Interface (API) est le suivant :

Le Master File (MF) comporte les éléments suivants :

PKCS-15 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-15(15) modules(1) pkcs-15(1)}

DEFINITIONS IMPLICIT TAGS ::=

BEGIN

IMPORTS


-- Constants
pkcs15-ub-identifier INTEGER ::= 255
pkcs15-ub-reference INTEGER ::= 255
pkcs15-ub-index INTEGER ::= 65535
pkcs15-ub-label INTEGER ::= pkcs15-ub-identifier
pkcs15-lb-minPinLength INTEGER ::= 4
pkcs15-ub-minPinLength INTEGER ::= 8
pkcs15-ub-storedPinLength INTEGER ::= 64
pkcs15-ub-recordLength INTEGER ::= 16383
pkcs15-ub-userConsent INTEGER ::= 15
pkcs15-ub-securityConditions INTEGER ::= 255
pkcs15-ub-seInfo INTEGER ::= 255

-- Object Identifiers
pkcs15 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-15(15)}
pkcs15-mo OBJECT IDENTIFIER ::= {pkcs15 1} -- Modules branch
pkcs15-at OBJECT IDENTIFIER ::= {pkcs15 2} -- Attribute branch
pkcs15-ct OBJECT IDENTIFIER ::= {pkcs15 3} -- Content type branch

-- Content Types
pkcs15-ct-PKCS15Token OBJECT IDENTIFIER ::= {pkcs15-ct 1}

-- Basic types
Identifier ::= OCTET STRING (SIZE (0..pkcs15-ub-identifier))
-- Pour l'identifiant interne de la carte.
Reference ::= INTEGER (0..pkcs15-ub-reference)
Label ::= UTF8String (SIZE(0..pkcs15-ub-label))

-- Credential Identifiers
KEY-IDENTIFIER ::= CLASS WITH SYNTAX
CredentialIdentifier {KEY-IDENTIFIER : IdentifierSet} ::= SEQUENCE
-- Pour identifier une cle privee ou un certificat.

KeyIdentifiers KEY-IDENTIFIER ::=
issuerAndSerialNumber KEY-IDENTIFIER::= {SYNTAX PKCS15-OPAQUE.&Type IDENTIFIED BY 1}
-- As defined in RFC 2630

subjectKeyId KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 2}
-- From x509v3 certificate extension

issuerAndSerialNumberHash KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 3}
-- Assumes SHA-1 hash of DER encoding of IssuerAndSerialNumber

subjectKeyHash KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 4}

issuerKeyHash KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 5}

issuerNameHash KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 6}
-- SHA-1 hash of DER-encoded issuer name

subjectNameHash KEY-IDENTIFIER ::= { SYNTAX OCTET STRING IDENTIFIED BY 7}
-- SHA-1 hash of DER-encoded subject name

ReferencedValue {Type} ::= CHOICE -- Reference externe.
(CONSTRAINED BY
URL ::= CHOICE
alg-id-sha1 AlgorithmIdentifier {{DigestAlgorithms}} ::=
SHA1Parameters ::= NULL

DigestInfoWithDefault ::= SEQUENCE
Path ::= SEQUENCE ( WITH COMPONENTS | WITH COMPONENTS
ObjectValue { Type } ::= CHOICE
-- Choix du mode d'acces a une cle ou un certificat.
(CONSTRAINED BY
PathOrObjects {ObjectType} ::= CHOICE
-- Soit un acces ou directement une cle ou un certificat.

CommonObjectAttributes ::= SEQUENCE
-- Description des attributs pour tous les objets - cle ou certificat.
(CONSTRAINED BY
CommonObjectFlags ::= BIT STRING
AccessControlRule ::= SEQUENCE
AccessMode ::= BIT STRING
SecurityCondition ::= CHOICE
CommonKeyAttributes ::= SEQUENCE
-- Description des attributs pour les cles publiques ou privees.

KeyUsageFlags ::= BIT STRING
KeyAccessFlags ::= BIT STRING CommonPrivateKeyAttributes ::= SEQUENCE
-- Description des attributs pour les cles privees.

CommonPublicKeyAttributes ::= SEQUENCE
-- Description des attributs pour les cles publiques.

CommonSecretKeyAttributes ::= SEQUENCE
-- Description des attributs pour les cles secretes.

KeyInfo {ParameterType, OperationsType} ::= CHOICE
-- Information sur une cle.

CommonCertificateAttributes ::= SEQUENCE
-- Description des attributs pour les certificats.

Usage ::= SEQUENCE (WITH COMPONENTS | WITH COMPONENTS
CommonDataObjectAttributes ::= SEQUENCE
-- Attributs communs aux objets.
(WITH COMPONENTS | WITH COMPONENTS
CommonAuthenticationObjectAttributes ::= SEQUENCE
PKCS15Object {ClassAttributes, SubClassAttributes, TypeAttributes} ::= SEQUENCE
-- Proprietes communes a tous les objets PKCS#15.

PKCS15Objects ::= CHOICE
-- Choix d'un objet PKCS#15.

PrivateKeys ::= PathOrObjects {PrivateKeyType}
SecretKeys ::= PathOrObjects {SecretKeyType}
PublicKeys ::= PathOrObjects {PublicKeyType}
Certificates ::= PathOrObjects {CertificateType}
DataObjects ::= PathOrObjects {DataType}
AuthObjects ::= PathOrObjects {AuthenticationType}

PrivateKeyType ::= CHOICE
-- Choix d'un type de cle privee.

PrivateKeyObject {KeyAttributes} ::= PKCS15Object
RSAPrivateKeyObject ::= SEQUENCE (CONSTRAINED BY
PrivateECKeyAttributes ::= SEQUENCE
ECPrivateKey ::= INTEGER

PrivateDHKeyAttributes ::= SEQUENCE
DHPrivateKey ::= INTEGER -- Diffie-Hellman exponent

PrivateDSAKeyAttributes ::= SEQUENCE
DSAPrivateKey ::= INTEGER

PrivateKEAKeyAttributes ::= SEQUENCE
KEAPrivateKey ::= INTEGER

PublicKeyType ::= CHOICE
-- Choix d'un type de cle publique.

PublicKeyObject {KeyAttributes} ::= PKCS15Object {CommonKeyAttributes, CommonPublicKeyAttributes, KeyAttributes}

PublicRSAKeyAttributes ::= SEQUENCE
RSAPublicKeyChoice ::= CHOICE
PublicECKeyAttributes ::= SEQUENCE
ECPublicKeyChoice ::= CHOICE
PublicDHKeyAttributes ::= SEQUENCE
DHPublicKeyChoice ::= CHOICE
PublicDSAKeyAttributes ::= SEQUENCE
DSAPublicKeyChoice ::= CHOICE
PublicKEAKeyAttributes ::= SEQUENCE
KEAPublicKeyChoice ::= CHOICE
SecretKeyType ::= CHOICE
-- Choix d'un type de cle secrete.

SecretKeyObject {KeyAttributes} ::= PKCS15Object {CommonKeyAttributes, CommonSecretKeyAttributes, KeyAttributes}

OtherKey ::= SEQUENCE
GenericSecretKeyAttributes ::= SEQUENCE
CertificateType ::= CHOICE
-- Choix d'un type de certificat.

CertificateObject {CertAttributes} ::= PKCS15Object { CommonCertificateAttributes, NULL, CertAttributes}

X509CertificateAttributes ::= SEQUENCE
X509AttributeCertificateAttributes ::= SEQUENCE
SPKICertificateAttributes ::= SEQUENCE
PGPCertificateAttributes ::= SEQUENCE
WTLSCertificateAttributes ::= SEQUENCE
X9-68CertificateAttributes ::= SEQUENCE
CVCertificateAttributes ::= SEQUENCE
DataType ::= CHOICE
-- Choix d'un type de donnees.

DataObject {DataObjectAttributes} ::= PKCS15Object (CONSTRAINED BY
OidDO ::= SEQUENCE
AuthenticationType ::= CHOICE
-- Choix d'un type d'authentification.

AuthenticationObject {AuthObjectAttributes} ::= PKCS15Object { CommonAuthenticationObjectAttributes, NULL, AuthObjectAttributes}

PinAttributes ::= SEQUENCE
PinFlags ::= BIT STRING (CONSTRAINED BY
PinType ::= ENUMERATED {bcd, ascii-numeric, utf8, ..., half-nibble-bcd, iso9564-1}

BiometricAttributes ::= SEQUENCE
BiometricFlags ::= BIT STRING -- Note: bits 0, 5, 6, and 7 are reserved for future use

BiometricType ::= CHOICE
FingerPrint ::= SEQUENCE
IrisScan ::= SEQUENCE
ExternalAuthObjectAttributes ::= CHOICE
AuthKeyAttributes ::= SEQUENCE
CertBasedAuthenticationAttributes ::= SEQUENCE
TokenInfo ::= SEQUENCE
-- Information generation sur l'application.
(CONSTRAINED BY
TokenFlags ::= BIT STRING
SecurityEnvironmentInfo ::= SEQUENCE
RecordInfo ::= SEQUENCE
AlgorithmInfo ::= SEQUENCE
PKCS15-ALGORITHM ::= CLASS WITH SYNTAX
PKCS15-OPAQUE ::= TYPE-IDENTIFIER
PublicKeyOperations ::= Operations
Operations ::= BIT STRING
pkcs15-alg-null PKCS15-ALGORITHM ::= {PARAMETERS NULL OPERATIONS {{generate-key}} ID -1}

AlgorithmSet PKCS15-ALGORITHM ::=
LastUpdate ::= CHOICE
-- Soft token related types and objects
EnvelopedData {Type} ::= SEQUENCE
-- Pour un emulateur logiciel de peripherique.

EncryptedContentInfo {Type} ::= SEQUENCE (CONSTRAINED BY })

PKCS15Token ::= SEQUENCE
KeyManagementInfo ::= SEQUENCE OF SEQUENCE (CONSTRAINED BY
PasswordInfo ::= SEQUENCE (CONSTRAINED BY
KeyDerivationAlgorithms ALGORITHM-IDENTIFIER ::=
KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::=
ContentEncryptionAlgorithms ALGORITHM-IDENTIFIER ::=
MACAlgorithms ALGORITHM-IDENTIFIER ::=
DigestAlgorithms ALGORITHM-IDENTIFIER ::=
-- Misc
DDO ::= SEQUENCE
Discretionary ASN.1 Data Objects (DDO) i.e. repertoire des fichiers normalises.

DIRRecord ::= [APPLICATION 1] SEQUENCE -- Entree d'un repertoire.

UnusedSpace ::= SEQUENCE
END