Tizen 2.0 Release
[external/libgnutls26.git] / lib / gnutls.asn
1 GNUTLS { }
2
3 DEFINITIONS EXPLICIT TAGS ::=
4
5 BEGIN
6
7 -- This file contains parts of PKCS-1 structures and some stuff
8 -- required for DSA keys.
9
10 RSAPublicKey ::= SEQUENCE {
11         modulus                 INTEGER, -- n
12         publicExponent          INTEGER  -- e 
13 }
14
15 -- 
16 -- Representation of RSA private key with information for the 
17 -- CRT algorithm.
18 --
19 RSAPrivateKey ::= SEQUENCE {
20   version          Version,
21   modulus          INTEGER, -- (Usually large) n
22   publicExponent   INTEGER, -- (Usually small) e
23   privateExponent  INTEGER, -- (Usually large) d
24   prime1           INTEGER, -- (Usually large) p
25   prime2           INTEGER, -- (Usually large) q
26   exponent1        INTEGER, -- (Usually large) d mod (p-1)
27   exponent2        INTEGER, -- (Usually large) d mod (q-1)
28   coefficient      INTEGER, -- (Usually large) (inverse of q) mod p
29   otherPrimeInfos  OtherPrimeInfos OPTIONAL
30 }
31
32 Version ::= INTEGER { two-prime(0), multi(1) }
33 -- (CONSTRAINED BY { version must be multi if otherPrimeInfos present }) --
34
35 OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
36
37 OtherPrimeInfo ::= SEQUENCE {
38   prime INTEGER,  -- ri
39   exponent INTEGER, -- di
40   coefficient INTEGER -- ti 
41 }
42
43 -- for signature calculation
44 -- added by nmav
45
46 AlgorithmIdentifier ::= SEQUENCE  {
47      algorithm               OBJECT IDENTIFIER,
48      parameters              ANY DEFINED BY algorithm OPTIONAL  
49 }
50                                 -- contains a value of the type
51                                 -- registered for use with the
52                                 -- algorithm object identifier value
53
54 DigestInfo ::= SEQUENCE {
55      digestAlgorithm DigestAlgorithmIdentifier,
56      digest Digest 
57 }
58
59 DigestAlgorithmIdentifier ::= AlgorithmIdentifier
60
61 Digest ::= OCTET STRING
62
63 DSAPublicKey ::= INTEGER
64
65 DSAParameters ::= SEQUENCE {
66         p                   INTEGER,
67         q                   INTEGER,
68         g                   INTEGER
69 }
70
71 DSASignatureValue ::= SEQUENCE {
72         r                   INTEGER,
73         s                   INTEGER
74 }
75
76 DSAPrivateKey ::= SEQUENCE {
77   version  INTEGER, -- should be zero
78   p        INTEGER,
79   q        INTEGER,
80   g        INTEGER,
81   Y        INTEGER, -- public
82   priv     INTEGER
83 }
84
85 -- from PKCS#3
86 DHParameter ::= SEQUENCE {
87   prime               INTEGER, -- p
88   base                INTEGER, -- g
89   privateValueLength  INTEGER OPTIONAL 
90 }
91
92
93 END