[Mrpostman-cvs] mrpostman/src/gnu/crypto Registry.java,1.1,1.2
Brought to you by:
chris_humphreys,
mrbook
From: <chr...@us...> - 2003-07-30 02:01:32
|
Update of /cvsroot/mrpostman/mrpostman/src/gnu/crypto In directory sc8-pr-cvs1:/tmp/cvs-serv30277 Modified Files: Registry.java Log Message: ran jalopy to format code to our conventions Index: Registry.java =================================================================== RCS file: /cvsroot/mrpostman/mrpostman/src/gnu/crypto/Registry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Registry.java 28 Jul 2003 11:22:52 -0000 1.1 --- Registry.java 30 Jul 2003 02:01:29 -0000 1.2 *************** *** 1,4 **** --- 1,34 ---- + /* + * -*- mode: java; c-basic-indent: 4; indent-tabs-mode: nil -*- + * :indentSize=4:noTabs=true:tabSize=4:indentOnTab=true:indentOnEnter=true:mode=java: + * ex: set tabstop=4 expandtab: + * + * MrPostman - webmail <-> email gateway + * Copyright (C) 2002-2003 MrPostman Development Group + * Projectpage: http://mrbook.org/mrpostman/ + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * In particular, this implies that users are responsible for + * using MrPostman after reading the terms and conditions given + * by their web-mail provider. + * + * You should have received a copy of the GNU General Public License + * Named LICENSE in the base directory of this distribution, + * if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + package gnu.crypto; + // ---------------------------------------------------------------------------- // $Id$ *************** *** 51,198 **** */ public interface Registry { ! // Constants ! // ------------------------------------------------------------------------- ! ! /** The name of our Provider. */ ! String GNU_CRYPTO = "GNU-CRYPTO"; ! ! // Names of properties to use in Maps when initialising primitives ......... ! // Symmetric block cipher algorithms and synonyms........................... - String ANUBIS_CIPHER = "anubis"; - String BLOWFISH_CIPHER = "blowfish"; - String DES_CIPHER = "des"; - String KHAZAD_CIPHER = "khazad"; - String RIJNDAEL_CIPHER = "rijndael"; - String SERPENT_CIPHER = "serpent"; // String SERPENT_BITSLICE_CIPHER = "serpent-bitslice"; ! String SQUARE_CIPHER = "square"; ! String TRIPLEDES_CIPHER = "tripledes"; ! String TWOFISH_CIPHER = "twofish"; ! String NULL_CIPHER = "null"; ! ! /** AES is synonymous to Rijndael for 128-bit block size only. */ ! String AES_CIPHER = "aes"; ! /** TripleDES is also known as DESede. */ ! String DESEDE_CIPHER = "desede"; ! // Message digest algorithms and synonyms................................... ! String WHIRLPOOL_HASH = "whirlpool"; ! String RIPEMD128_HASH = "ripemd128"; ! String RIPEMD160_HASH = "ripemd160"; ! String SHA160_HASH = "sha-160"; ! String MD5_HASH = "md5"; ! String MD4_HASH = "md4"; ! String MD2_HASH = "md2"; ! /** RIPEMD-128 is synonymous to RIPEMD128. */ ! String RIPEMD_128_HASH = "ripemd-128"; ! /** RIPEMD-160 is synonymous to RIPEMD160. */ ! String RIPEMD_160_HASH = "ripemd-160"; ! /** SHA-1 is synonymous to SHA-160. */ ! String SHA_1_HASH = "sha-1"; ! /** SHA1 is synonymous to SHA-160. */ ! String SHA1_HASH = "sha1"; ! /** SHA is synonymous to SHA-160. */ ! String SHA_HASH = "sha"; ! // Symmetric block cipher modes of operations............................... ! /** Electronic CodeBook mode. */ ! String ECB_MODE = "ecb"; ! /** Counter (NIST) mode. */ ! String CTR_MODE = "ctr"; ! /** Integer Counter Mode (David McGrew). */ ! String ICM_MODE = "icm"; ! /** Output Feedback Mode (NIST). */ ! String OFB_MODE = "ofb"; ! /** Cipher block chaining mode (NIST). */ ! String CBC_MODE = "cbc"; ! /** Cipher feedback mode (NIST). */ ! String CFB_MODE = "cfb"; ! // Padding scheme names and synonyms........................................ ! /** PKCS#7 padding scheme. */ ! String PKCS7_PAD = "pkcs7"; ! /** Trailing Bit Complement padding scheme. */ ! String TBC_PAD = "tbc"; ! // Pseudo-random number generators.......................................... ! /** (Apparently) RC4 keystream PRNG. */ ! String ARCFOUR_PRNG = "arcfour"; ! /** We use "rc4" as an alias for "arcfour". */ ! String RC4_PRNG = "rc4"; ! /** PRNG based on David McGrew's Integer Counter Mode. */ ! String ICM_PRNG = "icm"; ! /** PRNG based on a designated hash functiopn. */ ! String MD_PRNG = "md"; ! /** PRNG based on UMAC's Key Derivation Function. */ ! String UMAC_PRNG = "umac-kdf"; ! // Asymmetric keypair generators............................................ ! String DSS_KPG = "dss"; ! String RSA_KPG = "rsa"; ! /** DSA is synonymous to DSS. */ ! String DSA_KPG = "dsa"; ! // Signature-with-appendix schemes.......................................... ! String DSS_SIG = "dss"; ! String RSA_PSS_SIG = "rsa-pss"; ! /** DSA is synonymous to DSS. */ ! String DSA_SIG = "dsa"; ! // Keyed-Hash Message Authentication Code .................................. ! /** Name prefix of every HMAC implementation. */ ! String HMAC_NAME_PREFIX = "hmac-"; ! // Other MAC algorithms .................................................... - /** Message Authentication Code using Universal Hashing (Ted Krovetz). */ - String UHASH32 = "uhash32"; - String UMAC32 = "umac32"; - /** The Truncated Multi-Modular Hash Function -v1 (David McGrew). */ - String TMMH16 = "tmmh16"; // String TMMH32 = "tmmh32"; ! // Format IDs used to identify how we externalise asymmetric keys .......... ! int RAW_ENCODING_ID = 1; ! ! // Magic bytes we generate/expect in externalised asymmetric keys .......... ! // the four bytes represent G (0x47) for GNU, 1 (0x01) for Raw format, ! // D (0x44) for DSS or R (0x52) for RSA, and finally P (0x50) for Public, ! // p (0x70) for private, or S (0x53) for signature. ! byte[] MAGIC_RAW_DSS_PUBLIC_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x50}; ! byte[] MAGIC_RAW_DSS_PRIVATE_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x70}; ! byte[] MAGIC_RAW_DSS_SIGNATURE = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x53}; ! byte[] MAGIC_RAW_RSA_PUBLIC_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x50}; ! byte[] MAGIC_RAW_RSA_PRIVATE_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x70}; ! byte[] MAGIC_RAW_RSA_PSS_SIGNATURE = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x53}; ! // Methods ! // ------------------------------------------------------------------------- ! } --- 81,224 ---- */ public interface Registry { + // Constants + // ------------------------------------------------------------------------- ! /** The name of our Provider. */ ! String GNU_CRYPTO = "GNU-CRYPTO"; ! // Names of properties to use in Maps when initialising primitives ......... ! // Symmetric block cipher algorithms and synonyms........................... ! String ANUBIS_CIPHER = "anubis"; ! String BLOWFISH_CIPHER = "blowfish"; ! String DES_CIPHER = "des"; ! String KHAZAD_CIPHER = "khazad"; ! String RIJNDAEL_CIPHER = "rijndael"; ! String SERPENT_CIPHER = "serpent"; // String SERPENT_BITSLICE_CIPHER = "serpent-bitslice"; ! String SQUARE_CIPHER = "square"; ! String TRIPLEDES_CIPHER = "tripledes"; ! String TWOFISH_CIPHER = "twofish"; ! String NULL_CIPHER = "null"; ! /** AES is synonymous to Rijndael for 128-bit block size only. */ ! String AES_CIPHER = "aes"; ! /** TripleDES is also known as DESede. */ ! String DESEDE_CIPHER = "desede"; ! // Message digest algorithms and synonyms................................... ! String WHIRLPOOL_HASH = "whirlpool"; ! String RIPEMD128_HASH = "ripemd128"; ! String RIPEMD160_HASH = "ripemd160"; ! String SHA160_HASH = "sha-160"; ! String MD5_HASH = "md5"; ! String MD4_HASH = "md4"; ! String MD2_HASH = "md2"; ! /** RIPEMD-128 is synonymous to RIPEMD128. */ ! String RIPEMD_128_HASH = "ripemd-128"; ! /** RIPEMD-160 is synonymous to RIPEMD160. */ ! String RIPEMD_160_HASH = "ripemd-160"; ! /** SHA-1 is synonymous to SHA-160. */ ! String SHA_1_HASH = "sha-1"; ! /** SHA1 is synonymous to SHA-160. */ ! String SHA1_HASH = "sha1"; ! /** SHA is synonymous to SHA-160. */ ! String SHA_HASH = "sha"; ! // Symmetric block cipher modes of operations............................... ! /** Electronic CodeBook mode. */ ! String ECB_MODE = "ecb"; ! /** Counter (NIST) mode. */ ! String CTR_MODE = "ctr"; ! /** Integer Counter Mode (David McGrew). */ ! String ICM_MODE = "icm"; ! /** Output Feedback Mode (NIST). */ ! String OFB_MODE = "ofb"; ! /** Cipher block chaining mode (NIST). */ ! String CBC_MODE = "cbc"; ! /** Cipher feedback mode (NIST). */ ! String CFB_MODE = "cfb"; ! // Padding scheme names and synonyms........................................ ! /** PKCS#7 padding scheme. */ ! String PKCS7_PAD = "pkcs7"; ! /** Trailing Bit Complement padding scheme. */ ! String TBC_PAD = "tbc"; ! // Pseudo-random number generators.......................................... ! /** (Apparently) RC4 keystream PRNG. */ ! String ARCFOUR_PRNG = "arcfour"; ! /** We use "rc4" as an alias for "arcfour". */ ! String RC4_PRNG = "rc4"; ! /** PRNG based on David McGrew's Integer Counter Mode. */ ! String ICM_PRNG = "icm"; ! /** PRNG based on a designated hash functiopn. */ ! String MD_PRNG = "md"; ! /** PRNG based on UMAC's Key Derivation Function. */ ! String UMAC_PRNG = "umac-kdf"; ! // Asymmetric keypair generators............................................ ! String DSS_KPG = "dss"; ! String RSA_KPG = "rsa"; ! /** DSA is synonymous to DSS. */ ! String DSA_KPG = "dsa"; ! // Signature-with-appendix schemes.......................................... ! String DSS_SIG = "dss"; ! String RSA_PSS_SIG = "rsa-pss"; ! /** DSA is synonymous to DSS. */ ! String DSA_SIG = "dsa"; ! // Keyed-Hash Message Authentication Code .................................. ! /** Name prefix of every HMAC implementation. */ ! String HMAC_NAME_PREFIX = "hmac-"; ! // Other MAC algorithms .................................................... ! /** Message Authentication Code using Universal Hashing (Ted Krovetz). */ ! String UHASH32 = "uhash32"; ! String UMAC32 = "umac32"; ! /** The Truncated Multi-Modular Hash Function -v1 (David McGrew). */ ! String TMMH16 = "tmmh16"; // String TMMH32 = "tmmh32"; + // Format IDs used to identify how we externalise asymmetric keys .......... + int RAW_ENCODING_ID = 1; ! // Magic bytes we generate/expect in externalised asymmetric keys .......... ! // the four bytes represent G (0x47) for GNU, 1 (0x01) for Raw format, ! // D (0x44) for DSS or R (0x52) for RSA, and finally P (0x50) for Public, ! // p (0x70) for private, or S (0x53) for signature. ! byte[] MAGIC_RAW_DSS_PUBLIC_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x50}; ! byte[] MAGIC_RAW_DSS_PRIVATE_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x70}; ! byte[] MAGIC_RAW_DSS_SIGNATURE = new byte[] {0x47, RAW_ENCODING_ID, 0x44, 0x53}; ! byte[] MAGIC_RAW_RSA_PUBLIC_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x50}; ! byte[] MAGIC_RAW_RSA_PRIVATE_KEY = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x70}; ! byte[] MAGIC_RAW_RSA_PSS_SIGNATURE = new byte[] {0x47, RAW_ENCODING_ID, 0x52, 0x53}; ! // Methods ! // ------------------------------------------------------------------------- ! } \ No newline at end of file |