xref: /openbsd/lib/libkeynote/signature.h (revision d415bd75)
1 /* $OpenBSD: signature.h,v 1.5 2001/09/03 20:14:51 deraadt Exp $ */
2 /*
3  * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
4  *
5  * This code was written by Angelos D. Keromytis in Philadelphia, PA, USA,
6  * in April-May 1998
7  *
8  * Copyright (C) 1998, 1999 by Angelos D. Keromytis.
9  *
10  * Permission to use, copy, and modify this software with or without fee
11  * is hereby granted, provided that this entire notice is included in
12  * all copies of any software which is or includes a copy or
13  * modification of this software.
14  *
15  * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
16  * IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
17  * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
18  * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
19  * PURPOSE.
20  */
21 
22 #ifndef __SIGNATURE_H__
23 #define __SIGNATURE_H__
24 
25 #define KEYNOTE_HASH_NONE            0
26 #define KEYNOTE_HASH_SHA1            1
27 #define KEYNOTE_HASH_MD5             2
28 
29 #define DSA_HEX                    "dsa-hex:"
30 #define DSA_HEX_LEN 	           strlen(DSA_HEX)
31 #define DSA_BASE64           	   "dsa-base64:"
32 #define DSA_BASE64_LEN             strlen(DSA_BASE64)
33 #define RSA_PKCS1_HEX              "rsa-hex:"
34 #define RSA_PKCS1_HEX_LEN          strlen(RSA_PKCS1_HEX)
35 #define RSA_PKCS1_BASE64       	   "rsa-base64:"
36 #define RSA_PKCS1_BASE64_LEN       strlen(RSA_PKCS1_BASE64)
37 #define ELGAMAL_HEX                "elgamal-hex:"
38 #define ELGAMAL_HEX_LEN            strlen(ELGAMAL_HEX)
39 #define ELGAMAL_BASE64             "elgamal-base64:"
40 #define ELGAMAL_BASE64_LEN         strlen(ELGAMAL_BASE64)
41 #define PGP_NATIVE                 "pgp:"
42 #define PGP_NATIVE_LEN             strlen(PGP_NATIVE)
43 #define BINARY_BASE64              "binary-base64:"
44 #define BINARY_BASE64_LEN          strlen(BINARY_BASE64)
45 #define BINARY_HEX                 "binary-hex:"
46 #define BINARY_HEX_LEN             strlen(BINARY_HEX)
47 #define X509_BASE64		   "x509-base64:"
48 #define X509_BASE64_LEN		   strlen(X509_BASE64)
49 #define X509_HEX		   "x509-hex:"
50 #define X509_HEX_LEN		   strlen(X509_HEX)
51 
52 #define KEYNOTE_PRIVATE_KEY_PREFIX     "private-"
53 #define KEYNOTE_PRIVATE_KEY_PREFIX_LEN strlen(KEYNOTE_PRIVATE_KEY_PREFIX)
54 
55 #define LARGEST_HASH_SIZE          20 /* In bytes, length of SHA1 hash */
56 #endif /* __SIGNATURE_H__ */
57