1:
37:
38:
39: package ;
40:
41:
45: public interface Registry
46: {
47:
48: String GNU_SECURITY = "GNU";
49: String GNU_CRYPTO = "GNU-CRYPTO";
50: String GNU_SASL = "GNU-SASL";
51:
52:
53: String VERSION_STRING = "2.1.0";
54:
55:
56:
57:
58:
59: String ANUBIS_CIPHER = "anubis";
60:
61: String BLOWFISH_CIPHER = "blowfish";
62:
63: String DES_CIPHER = "des";
64:
65: String KHAZAD_CIPHER = "khazad";
66:
67: String RIJNDAEL_CIPHER = "rijndael";
68:
69: String SERPENT_CIPHER = "serpent";
70:
71: String SQUARE_CIPHER = "square";
72:
73: String TRIPLEDES_CIPHER = "tripledes";
74:
75: String TWOFISH_CIPHER = "twofish";
76:
77: String CAST5_CIPHER = "cast5";
78:
79: String NULL_CIPHER = "null";
80:
81:
82: String AES_CIPHER = "aes";
83:
84:
85: String DESEDE_CIPHER = "desede";
86:
87:
88: String CAST128_CIPHER = "cast128";
89:
90: String CAST_128_CIPHER = "cast-128";
91:
92:
93:
94: String KWA_PREFIX = "kw-";
95: String AES_KWA = KWA_PREFIX + AES_CIPHER;
96: String AES128_KWA = AES_KWA + "128";
97: String AES192_KWA = AES_KWA + "192";
98: String AES256_KWA = AES_KWA + "256";
99: String RIJNDAEL_KWA = KWA_PREFIX + RIJNDAEL_CIPHER;
100:
101: String TRIPLEDES_KWA = KWA_PREFIX + TRIPLEDES_CIPHER;
102: String DESEDE_KWA = KWA_PREFIX + DESEDE_CIPHER;
103:
104:
105:
106: String WHIRLPOOL_HASH = "whirlpool";
107:
108: String RIPEMD128_HASH = "ripemd128";
109:
110: String RIPEMD160_HASH = "ripemd160";
111:
112: String SHA160_HASH = "sha-160";
113:
114: String SHA256_HASH = "sha-256";
115:
116: String SHA384_HASH = "sha-384";
117:
118: String SHA512_HASH = "sha-512";
119:
120: String TIGER_HASH = "tiger";
121:
122: String HAVAL_HASH = "haval";
123:
124: String MD5_HASH = "md5";
125:
126: String MD4_HASH = "md4";
127:
128: String MD2_HASH = "md2";
129:
130:
131: String RIPEMD_128_HASH = "ripemd-128";
132:
133:
134: String RIPEMD_160_HASH = "ripemd-160";
135:
136:
137: String SHA_1_HASH = "sha-1";
138:
139:
140: String SHA1_HASH = "sha1";
141:
142:
143: String SHA_HASH = "sha";
144:
145:
146:
147:
148: String ECB_MODE = "ecb";
149:
150:
151: String CTR_MODE = "ctr";
152:
153:
154: String ICM_MODE = "icm";
155:
156:
157: String OFB_MODE = "ofb";
158:
159:
160: String CBC_MODE = "cbc";
161:
162:
163: String CFB_MODE = "cfb";
164:
165:
166: String EAX_MODE = "eax";
167:
168:
169:
170:
171: String PKCS5_PAD = "pkcs5";
172:
173:
174: String PKCS7_PAD = "pkcs7";
175:
176:
177: String TBC_PAD = "tbc";
178:
179:
180: String EME_PKCS1_V1_5_PAD = "eme-pkcs1-v1.5";
181:
182:
183: String SSL3_PAD = "ssl3";
184:
185:
186: String TLS1_PAD = "tls1";
187:
188:
189: String ISO10126_PAD = "iso10126";
190:
191:
192:
193:
194: String ARCFOUR_PRNG = "arcfour";
195:
196:
197: String RC4_PRNG = "rc4";
198:
199:
200: String ICM_PRNG = "icm";
201:
202:
203: String MD_PRNG = "md";
204:
205:
206: String UMAC_PRNG = "umac-kdf";
207:
208:
212: String PBKDF2_PRNG_PREFIX = "pbkdf2-";
213:
214:
215: String CSPRNG_PRNG = "csprng";
216:
217:
218: String FORTUNA_PRNG = "fortuna";
219:
220:
221: String FORTUNA_GENERATOR_PRNG = "fortuna-generator";
222:
223:
224:
225: String DSS_KPG = "dss";
226:
227: String RSA_KPG = "rsa";
228:
229: String DH_KPG = "dh";
230:
231: String SRP_KPG = "srp";
232:
233:
234: String DSA_KPG = "dsa";
235:
236:
237:
238: String DSS_SIG = "dss";
239:
240: String RSA_SIG_PREFIX = "rsa-";
241:
242: String RSA_PSS_ENCODING = "pss";
243:
244: String RSA_PSS_SIG = RSA_SIG_PREFIX + RSA_PSS_ENCODING;
245:
246: String RSA_PKCS1_V1_5_ENCODING = "pkcs1-v1.5";
247:
248: String RSA_PKCS1_V1_5_SIG = RSA_SIG_PREFIX + RSA_PKCS1_V1_5_ENCODING;
249:
250:
251: String DSA_SIG = "dsa";
252:
253:
254:
255: String DH_KA = "dh";
256:
257: String ELGAMAL_KA = "elgamal";
258:
259: String SRP6_KA = "srp6";
260:
261: String SRP_SASL_KA = "srp-sasl";
262:
263: String SRP_TLS_KA = "srp-tls";
264:
265:
266:
267:
268: String HMAC_NAME_PREFIX = "hmac-";
269:
270:
271:
272:
273: String OMAC_PREFIX = "omac-";
274:
275:
276: String UHASH32 = "uhash32";
277:
278: String UMAC32 = "umac32";
279:
280:
281: String TMMH16 = "tmmh16";
282:
283:
284:
285:
286:
287: String RAW_ENCODING = "gnu.crypto.raw.format";
288: String X509_ENCODING = "gnu.crypto.x509.format";
289: String PKCS8_ENCODING = "gnu.crypto.pkcs8.format";
290: String ASN1_ENCODING = "gnu.crypto.asn1.format";
291:
292:
293: String RAW_ENCODING_SHORT_NAME = "RAW";
294: String X509_ENCODING_SORT_NAME = "X.509";
295: String PKCS8_ENCODING_SHORT_NAME = "PKCS#8";
296: String ASN1_ENCODING_SHORT_NAME = "ASN.1";
297:
298:
299: int RAW_ENCODING_ID = 1;
300: int X509_ENCODING_ID = 2;
301: int PKCS8_ENCODING_ID = 3;
302: int ASN1_ENCODING_ID = 4;
303:
304:
305: String DSA_OID_STRING = "1.2.840.10040.4.1";
306: String RSA_OID_STRING = "1.2.840.113549.1.1.1";
307: String DH_OID_STRING = "1.2.840.10046.2.1";
308:
309:
310:
311:
312:
313:
314: byte[] MAGIC_RAW_DSS_PUBLIC_KEY = new byte[] {
315: 0x47, RAW_ENCODING_ID, 0x44, 0x50 };
316:
317: byte[] MAGIC_RAW_DSS_PRIVATE_KEY = new byte[] {
318: 0x47, RAW_ENCODING_ID, 0x44, 0x70 };
319:
320: byte[] MAGIC_RAW_DSS_SIGNATURE = new byte[] {
321: 0x47, RAW_ENCODING_ID, 0x44, 0x53 };
322:
323: byte[] MAGIC_RAW_RSA_PUBLIC_KEY = new byte[] {
324: 0x47, RAW_ENCODING_ID, 0x52, 0x50 };
325:
326: byte[] MAGIC_RAW_RSA_PRIVATE_KEY = new byte[] {
327: 0x47, RAW_ENCODING_ID, 0x52, 0x70 };
328:
329: byte[] MAGIC_RAW_RSA_PSS_SIGNATURE = new byte[] {
330: 0x47, RAW_ENCODING_ID, 0x52, 0x53 };
331:
332: byte[] MAGIC_RAW_RSA_PKCS1V1_5_SIGNATURE = new byte[] {
333: 0x47, RAW_ENCODING_ID, 0x52, 0x54 };
334:
335: byte[] MAGIC_RAW_DH_PUBLIC_KEY = new byte[] {
336: 0x47, RAW_ENCODING_ID, 0x48, 0x50 };
337:
338: byte[] MAGIC_RAW_DH_PRIVATE_KEY = new byte[] {
339: 0x47, RAW_ENCODING_ID, 0x48, 0x70 };
340:
341: byte[] MAGIC_RAW_SRP_PUBLIC_KEY = new byte[] {
342: 0x47, RAW_ENCODING_ID, 0x53, 0x50 };
343:
344: byte[] MAGIC_RAW_SRP_PRIVATE_KEY = new byte[] {
345: 0x47, RAW_ENCODING_ID, 0x53, 0x70 };
346:
347:
348:
349: String SASL_PREFIX = "gnu.crypto.sasl";
350:
351:
352: String SASL_USERNAME = SASL_PREFIX + ".username";
353:
354:
355: String SASL_PASSWORD = SASL_PREFIX + ".password";
356:
357:
358: String SASL_AUTH_INFO_PROVIDER_PKGS = SASL_PREFIX + ".auth.info.provider.pkgs";
359:
360:
361: String SASL_AUTHORISATION_ID = SASL_PREFIX + ".authorisation.ID";
362:
363:
364: String SASL_PROTOCOL = SASL_PREFIX + ".protocol";
365:
366:
367: String SASL_SERVER_NAME = SASL_PREFIX + ".server.name";
368:
369:
370: String SASL_CALLBACK_HANDLER = SASL_PREFIX + ".callback.handler";
371:
372:
373: String SASL_CHANNEL_BINDING = SASL_PREFIX + ".channel.binding";
374:
375:
376:
377:
378: int SASL_ONE_BYTE_MAX_LIMIT = 255;
379:
380:
384: int SASL_TWO_BYTE_MAX_LIMIT = 65535;
385:
386:
387: int SASL_FOUR_BYTE_MAX_LIMIT = 2147483383;
388:
389:
390: int SASL_BUFFER_MAX_LIMIT = 2147483643;
391:
392:
393:
394: String SASL_ANONYMOUS_MECHANISM = "ANONYMOUS";
395:
396: String SASL_CRAM_MD5_MECHANISM = "CRAM-MD5";
397:
398: String SASL_PLAIN_MECHANISM = "PLAIN";
399:
400: String SASL_SRP_MECHANISM = "SRP";
401:
402:
403:
404: String SASL_HMAC_MD5_IALG = "HMACwithMD5";
405:
406: String SASL_HMAC_SHA_IALG = "HMACwithSHA";
407:
408:
409:
410:
411: String QOP_AUTH = "auth";
412:
413:
414: String QOP_AUTH_INT = "auth-int";
415:
416:
417: String QOP_AUTH_CONF = "auth-conf";
418:
419:
420:
421: String STRENGTH_HIGH = "high";
422:
423: String STRENGTH_MEDIUM = "medium";
424:
425: String STRENGTH_LOW = "low";
426:
427:
428:
429:
430: String SERVER_AUTH_TRUE = "true";
431:
432:
433: String SERVER_AUTH_FALSE = "false";
434:
435:
436:
437: String REUSE_TRUE = "true";
438:
439: String REUSE_FALSE = "false";
440:
441:
442:
443: byte[] GKR_MAGIC = new byte[] { 0x47, 0x4b, 0x52, 0x01 };
444:
445:
446: int GKR_PRIVATE_KEYS = 1 << 0;
447:
448: int GKR_PUBLIC_CREDENTIALS = 1 << 1;
449:
450: int GKR_CERTIFICATES = 1 << 2;
451:
452:
453: int GKR_HMAC_MD5_128 = 0;
454:
455: int GKR_HMAC_SHA_160 = 1;
456:
457: int GKR_HMAC_MD5_96 = 2;
458:
459: int GKR_HMAC_SHA_96 = 3;
460:
461:
462: int GKR_CIPHER_AES_128_OFB = 0;
463:
464: int GKR_CIPHER_AES_128_CBC = 1;
465: }