1*5e4ac158Sderaadt /* $OpenBSD: signature.h,v 1.5 2001/09/03 20:14:51 deraadt Exp $ */ 2983e9580Sangelos /* 3983e9580Sangelos * The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu) 4983e9580Sangelos * 5983e9580Sangelos * This code was written by Angelos D. Keromytis in Philadelphia, PA, USA, 6983e9580Sangelos * in April-May 1998 7983e9580Sangelos * 8983e9580Sangelos * Copyright (C) 1998, 1999 by Angelos D. Keromytis. 9983e9580Sangelos * 10*5e4ac158Sderaadt * Permission to use, copy, and modify this software with or without fee 11983e9580Sangelos * is hereby granted, provided that this entire notice is included in 12983e9580Sangelos * all copies of any software which is or includes a copy or 13983e9580Sangelos * modification of this software. 14983e9580Sangelos * 15983e9580Sangelos * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 16983e9580Sangelos * IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO 17983e9580Sangelos * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 18983e9580Sangelos * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 19983e9580Sangelos * PURPOSE. 20983e9580Sangelos */ 21983e9580Sangelos 22983e9580Sangelos #ifndef __SIGNATURE_H__ 23983e9580Sangelos #define __SIGNATURE_H__ 24983e9580Sangelos 25983e9580Sangelos #define KEYNOTE_HASH_NONE 0 26983e9580Sangelos #define KEYNOTE_HASH_SHA1 1 27983e9580Sangelos #define KEYNOTE_HASH_MD5 2 28983e9580Sangelos 29983e9580Sangelos #define DSA_HEX "dsa-hex:" 30983e9580Sangelos #define DSA_HEX_LEN strlen(DSA_HEX) 31983e9580Sangelos #define DSA_BASE64 "dsa-base64:" 32983e9580Sangelos #define DSA_BASE64_LEN strlen(DSA_BASE64) 33983e9580Sangelos #define RSA_PKCS1_HEX "rsa-hex:" 34983e9580Sangelos #define RSA_PKCS1_HEX_LEN strlen(RSA_PKCS1_HEX) 35983e9580Sangelos #define RSA_PKCS1_BASE64 "rsa-base64:" 36983e9580Sangelos #define RSA_PKCS1_BASE64_LEN strlen(RSA_PKCS1_BASE64) 37983e9580Sangelos #define ELGAMAL_HEX "elgamal-hex:" 38983e9580Sangelos #define ELGAMAL_HEX_LEN strlen(ELGAMAL_HEX) 39983e9580Sangelos #define ELGAMAL_BASE64 "elgamal-base64:" 40983e9580Sangelos #define ELGAMAL_BASE64_LEN strlen(ELGAMAL_BASE64) 41983e9580Sangelos #define PGP_NATIVE "pgp:" 42983e9580Sangelos #define PGP_NATIVE_LEN strlen(PGP_NATIVE) 43983e9580Sangelos #define BINARY_BASE64 "binary-base64:" 44983e9580Sangelos #define BINARY_BASE64_LEN strlen(BINARY_BASE64) 45983e9580Sangelos #define BINARY_HEX "binary-hex:" 46983e9580Sangelos #define BINARY_HEX_LEN strlen(BINARY_HEX) 47983e9580Sangelos #define X509_BASE64 "x509-base64:" 48983e9580Sangelos #define X509_BASE64_LEN strlen(X509_BASE64) 49983e9580Sangelos #define X509_HEX "x509-hex:" 50983e9580Sangelos #define X509_HEX_LEN strlen(X509_HEX) 51983e9580Sangelos 52983e9580Sangelos #define KEYNOTE_PRIVATE_KEY_PREFIX "private-" 53983e9580Sangelos #define KEYNOTE_PRIVATE_KEY_PREFIX_LEN strlen(KEYNOTE_PRIVATE_KEY_PREFIX) 54983e9580Sangelos 55983e9580Sangelos #define LARGEST_HASH_SIZE 20 /* In bytes, length of SHA1 hash */ 56983e9580Sangelos #endif /* __SIGNATURE_H__ */ 57