summaryrefslogtreecommitdiff
path: root/lib/gnutls.asn
blob: f485c27d6d918dbada5d7d212230f4af55be1bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
GNUTLS { }

DEFINITIONS EXPLICIT TAGS ::=

BEGIN

-- This file contains parts of PKCS-1 structures and some stuff
-- required for DSA keys.

RSAPublicKey ::= SEQUENCE {
        modulus                 INTEGER, -- n
        publicExponent          INTEGER  -- e 
}

-- 
-- Representation of RSA private key with information for the 
-- CRT algorithm.
--
RSAPrivateKey ::= SEQUENCE {
  version          Version,
  modulus          INTEGER, -- (Usually large) n
  publicExponent   INTEGER, -- (Usually small) e
  privateExponent  INTEGER, -- (Usually large) d
  prime1           INTEGER, -- (Usually large) p
  prime2           INTEGER, -- (Usually large) q
  exponent1        INTEGER, -- (Usually large) d mod (p-1)
  exponent2        INTEGER, -- (Usually large) d mod (q-1)
  coefficient      INTEGER, -- (Usually large) (inverse of q) mod p
  otherPrimeInfos  OtherPrimeInfos OPTIONAL
}

Version ::= INTEGER { two-prime(0), multi(1) }
-- (CONSTRAINED BY { version must be multi if otherPrimeInfos present }) --

OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo

OtherPrimeInfo ::= SEQUENCE {
  prime INTEGER,  -- ri
  exponent INTEGER, -- di
  coefficient INTEGER -- ti 
}

-- for signature calculation
-- added by nmav

AlgorithmIdentifier ::= SEQUENCE  {
     algorithm               OBJECT IDENTIFIER,
     parameters              ANY DEFINED BY algorithm OPTIONAL  
}
                                -- contains a value of the type
                                -- registered for use with the
                                -- algorithm object identifier value

DigestInfo ::= SEQUENCE {
     digestAlgorithm DigestAlgorithmIdentifier,
     digest Digest 
}

DigestAlgorithmIdentifier ::= AlgorithmIdentifier

Digest ::= OCTET STRING

DSAPublicKey ::= INTEGER

DSAParameters ::= SEQUENCE {
        p                   INTEGER,
        q                   INTEGER,
        g                   INTEGER
}

DSASignatureValue ::= SEQUENCE {
        r                   INTEGER,
        s                   INTEGER
}

DSAPrivateKey ::= SEQUENCE {
  version  INTEGER, -- should be zero
  p        INTEGER,
  q        INTEGER,
  g        INTEGER,
  Y        INTEGER, -- public
  priv     INTEGER
}

-- from PKCS#3
DHParameter ::= SEQUENCE {
  prime               INTEGER, -- p
  base                INTEGER, -- g
  privateValueLength  INTEGER OPTIONAL 
}


END