2 DEFINITIONS IMPLICIT TAGS ::=
11 -- base OIDs for Apple, Apple Data Security
12 appleBaseOid OBJECT IDENTIFIER ::= { 1 2 840 113635 }
13 appleDataSecurity OBJECT IDENTIFIER ::= { appleBaseOid 100 }
15 -- base OIDs for Apple Trust Policies and Algorithms
16 appleTrustPolicy OBJECT IDENTIFIER ::= { appleDataSecurity 1 }
17 appleSecurityAlgorithm OBJECT IDENTIFIER ::=Ê{ appleDataSecurity 2 }
19 -- Apple trust policy OIDs
21 appleISignTP OBJECT IDENTIFIER ::= { appleTrustPolicy 1 }
22 appleX509Basic OBJECT IDENTIFIER ::= { appleTrustPolicy 2 }
23 appleSSLPolicy OBJECT IDENTIFIER ::= { appleTrustPolicy 3 }
26 appleFee OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 1 }
27 appleAsc OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 2 }
28 appleFeeMD5 OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 3 }
29 appleFeeSHA1 OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 4 }
30 appleFeed OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 5 }
31 appleFeedExp OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 6 }
32 appleECDSA OBJECT IDENTIFIER ::= { appleSecurityAlgorithm 7 }
34 -- FEE ElGamal-style signature
35 FEEElGamalSignature ::= SEQUENCE {
40 -- FEE ECDSA-style signature
41 FEEECDSASignature ::= SEQUENCE {
46 -- FEE Curve parameters
47 FEEPrimeType ::= INTEGER { pt-mersenne(0), pt-fee(1), pt-general(2) }
48 FEECurveType ::= INTEGER { ct-montgomery(0), ct-weierstrass(1), ct-general(2) }
50 FEECurveParameters ::= SEQUENCE
52 primeType FEEPrimeType,
53 curveType FEECurveType,
54 q INTEGER, -- unsigned
58 bb BigIntegerStr, -- can't use variable/field b
61 x1Minus BigIntegerStr,
62 cOrderPlus BigIntegerStr,
63 cOrderMinus BigIntegerStr,
64 x1OrderPlus BigIntegerStr,
65 x1OrderMinus BigIntegerStr,
66 basePrime BigIntegerStr OPTIONAL -- iff FEEPrimeType == pt-general
71 FEEPublicKey ::= SEQUENCE
74 curveParams FEECurveParameters,
77 plusY BigIntegerStr OPTIONAL -- iff FEECurveType == ct-weierstrass
80 FEEPrivateKey ::= SEQUENCE
83 curveParams FEECurveParameters,
84 privData BigIntegerStr
89 -- DSA private keys are represented as a PrivateKeyInfo (pkcs8); DSA public keys
90 -- are represented as SubjectPublicKeyInfo (sm_s509af). However, the public p, g,
91 -- and q parameters are expressed in the AlgorithmIdentifier.parameters
92 -- field which is an ANY type. To simplify encoding and decoding (AsnAny is a royal
93 -- hassle to deal with), we define new structs for the entire keys here.
94 -- NOTE: these definition are derived from reverse engineering the key blobs
95 -- created by BSAFE 4.0 using info type KI_DSA{Public,Private}BER. The BSAFE
96 -- documentation claims that this encoding is X9.20 compatible; however BSAFE
97 -- adds a field to the dss-params (here called DSABSafeParams) struct which
98 -- indicates the prime size in bits. The encoding and decoding implemented here
99 -- is verified to be compatible with BSAFE 4.0 but no othyer implementations of
102 DSAPrivateKey ::= SEQUENCE
105 dsaAlg DSAAlgorithmId,
106 privateKey OCTET STRING
110 -- The publicKey is actually the DER encoding of an ASN integer, wrapped in a
113 DSAPublicKey ::= SEQUENCE
115 dsaAlg DSAAlgorithmId,
120 -- A convenient replacement for a DSA AlgorithmIdentifier
122 DSAAlgorithmId ::= SEQUENCE
124 algorithm OBJECT IDENTIFIER, -- id_dsa from sm_cms
125 params DSABsafeParams
129 -- This is the "ANY" parameter from AlgorithmIdentifier.
131 DSABsafeParams ::= SEQUENCE
133 keySizeInBits INTEGER,
140 -- DSAPrivateKey.privateKey is actually the DER encoding, as an AsnOcts, of this.
142 DSAPrivateKeyOcts ::= SEQUENCE
144 privateKey BigIntegerStr
150 DSASignature ::= SEQUENCE
157 -- Encoding of the basic DSA parameters for use in a CDSA key generation context.
159 DSAAlgParams ::= SEQUENCE