diff options
author | Werner Koch <wk@gnupg.org> | 1997-12-12 13:03:58 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1997-12-12 13:03:58 +0100 |
commit | 68ea0f43533096d5c46bad4aee6e5d5864307f4a (patch) | |
tree | f5d3601897a3bdfbce113d5e1ed8b4336c83744a /g10/packet.h | |
parent | fingerprints and self signatures added (diff) | |
download | gnupg2-68ea0f43533096d5c46bad4aee6e5d5864307f4a.tar.xz gnupg2-68ea0f43533096d5c46bad4aee6e5d5864307f4a.zip |
added option file handling
Diffstat (limited to 'g10/packet.h')
-rw-r--r-- | g10/packet.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/g10/packet.h b/g10/packet.h index 57adebe5f..609bf8853 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -54,11 +54,11 @@ typedef struct { byte pubkey_algo; /* algorithm used for public key scheme */ union { struct { - MPI rsa_integer; /* integer containing the DEK */ - } rsa; - struct { MPI a, b; /* integers with the encrypteded DEK */ } elg; + struct { + MPI rsa_integer; /* integer containing the DEK */ + } rsa; } d; } PKT_pubkey_enc; @@ -82,13 +82,13 @@ typedef struct { struct { byte digest_algo; /* algorithm used for digest (DIGEST_ALGO_xxxx) */ byte digest_start[2]; /* first 2 byte of the digest */ - MPI rsa_integer; /* the encrypted digest */ - } rsa; + MPI a, b; /* integers with the digest */ + } elg; struct { byte digest_algo; /* algorithm used for digest (DIGEST_ALGO_xxxx) */ byte digest_start[2]; /* first 2 byte of the digest */ - MPI a, b; /* integers with the digest */ - } elg; + MPI rsa_integer; /* the encrypted digest */ + } rsa; } d; } PKT_signature; @@ -100,14 +100,14 @@ typedef struct { md_filter_context_t mfx; union { struct { - MPI rsa_n; /* public modulus */ - MPI rsa_e; /* public exponent */ - } rsa; - struct { MPI p; /* prime */ MPI g; /* group generator */ MPI y; /* g^x mod p */ } elg; + struct { + MPI rsa_n; /* public modulus */ + MPI rsa_e; /* public exponent */ + } rsa; } d; } PKT_public_cert; @@ -117,12 +117,10 @@ typedef struct { byte pubkey_algo; /* algorithm used for public key scheme */ union { struct { - MPI rsa_n; /* public modulus */ - MPI rsa_e; /* public exponent */ - MPI rsa_d; /* secret descryption exponent */ - MPI rsa_p; /* secret first prime number */ - MPI rsa_q; /* secret second prime number */ - MPI rsa_u; /* secret multiplicative inverse */ + MPI p; /* prime */ + MPI g; /* group generator */ + MPI y; /* g^x mod p */ + MPI x; /* secret exponent */ u16 csum; /* checksum */ byte is_protected; /* The above infos are protected and must */ /* be decrypteded before use */ @@ -134,12 +132,14 @@ typedef struct { * to plain storage */ } blowfish; } protect; - } rsa; + } elg; struct { - MPI p; /* prime */ - MPI g; /* group generator */ - MPI y; /* g^x mod p */ - MPI x; /* secret exponent */ + MPI rsa_n; /* public modulus */ + MPI rsa_e; /* public exponent */ + MPI rsa_d; /* secret descryption exponent */ + MPI rsa_p; /* secret first prime number */ + MPI rsa_q; /* secret second prime number */ + MPI rsa_u; /* secret multiplicative inverse */ u16 csum; /* checksum */ byte is_protected; /* The above infos are protected and must */ /* be decrypteded before use */ @@ -151,7 +151,7 @@ typedef struct { * to plain storage */ } blowfish; } protect; - } elg; + } rsa; } d; } PKT_secret_cert; @@ -213,6 +213,7 @@ int proc_packets( IOBUF a ); /*-- parse-packet.c --*/ int set_packet_list_mode( int mode ); +int search_packet( IOBUF inp, PACKET *pkt, int pkttype, ulong *retpos ); int parse_packet( IOBUF inp, PACKET *ret_pkt); /*-- build-packet.c --*/ |