2 * CryptKitAsn1.h - ASN1 templates for FEE objects
5 #ifndef _CRYPT_KIT_ASN1_H_
6 #define _CRYPT_KIT_ASN1_H_
11 #include <Security/cssmtype.h>
12 #include <Security/secasn1t.h>
19 -- FEE Curve parameters (defined in <security_cryptkit/feeTypes.h>)
20 FEEPrimeType ::= INTEGER { FPT_Mersenne(0), FPT_FEE(1), FPT_General(2) }
21 FEECurveType ::= INTEGER { FCT_Montgomery(0), FCT_Weierstrass(1),
26 FEECurveParameters ::= SEQUENCE
28 primeType FEEPrimeType,
29 curveType FEECurveType,
30 q INTEGER, -- unsigned
34 bb BigIntegerStr, -- can't use variable/field b
37 x1Minus BigIntegerStr,
38 cOrderPlus BigIntegerStr,
39 cOrderMinus BigIntegerStr,
40 x1OrderPlus BigIntegerStr,
41 x1OrderMinus BigIntegerStr,
42 basePrime BigIntegerStr OPTIONAL
43 -- iff FEEPrimeType == CT_GENERAL
53 CSSM_DATA b_
; // can't use variable/field b
58 CSSM_DATA cOrderMinus
;
59 CSSM_DATA x1OrderPlus
;
60 CSSM_DATA x1OrderMinus
;
61 CSSM_DATA basePrime
; // OPTIONAL
62 } FEECurveParametersASN1
;
64 extern const SecAsn1Template FEECurveParametersASN1Template
[];
67 -- FEE ElGamal-style signature
68 FEEElGamalSignature ::= SEQUENCE {
76 } FEEElGamalSignatureASN1
;
78 extern const SecAsn1Template FEEElGamalSignatureASN1Template
[];
81 -- FEE ECDSA-style signature
82 FEEECDSASignature ::= SEQUENCE {
90 } FEEECDSASignatureASN1
;
92 extern const SecAsn1Template FEEECDSASignatureASN1Template
[];
95 FEEPublicKey ::= SEQUENCE
98 curveParams FEECurveParameters,
100 minusX BigIntegerStr,
101 plusY BigIntegerStr OPTIONAL
102 -- iff FEECurveType == ct-weierstrass
107 FEECurveParametersASN1 curveParams
;
110 CSSM_DATA plusY
; // OPTIONAL
113 extern const SecAsn1Template FEEPublicKeyASN1Template
[];
116 FEEPrivateKey ::= SEQUENCE
119 curveParams FEECurveParameters,
120 privData BigIntegerStr
125 FEECurveParametersASN1 curveParams
;
129 extern const SecAsn1Template FEEPrivateKeyASN1Template
[];
135 #endif /* _CRYPT_KIT_ASN1_H_ */