From c79e17731f462d6d42b917027a7085c0f59a2214 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 11 Feb 2015 20:28:47 +0100 Subject: [PATCH] Add more Camellia OIDs. Reviewed-by: Rich Salz --- crypto/objects/obj_dat.h | 82 +++++++++++++++++++++++++++++++++++--- crypto/objects/obj_mac.h | 60 ++++++++++++++++++++++++++++ crypto/objects/obj_mac.num | 12 ++++++ crypto/objects/objects.txt | 12 ++++++ 4 files changed, 161 insertions(+), 5 deletions(-) diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index e93e1b0d42..336daefc2b 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 961 -#define NUM_SN 954 -#define NUM_LN 954 -#define NUM_OBJ 890 +#define NUM_NID 973 +#define NUM_SN 966 +#define NUM_LN 966 +#define NUM_OBJ 902 -static const unsigned char lvalues[6255]={ +static const unsigned char lvalues[6351]={ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 0] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 6] OBJ_pkcs */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 13] OBJ_md2 */ @@ -952,6 +952,18 @@ static const unsigned char lvalues[6255]={ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x01,/* [6221] OBJ_jurisdictionLocalityName */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x02,/* [6232] OBJ_jurisdictionStateOrProvinceName */ 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x3C,0x02,0x01,0x03,/* [6243] OBJ_jurisdictionCountryName */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x06, /* [6254] OBJ_camellia_128_gcm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x07, /* [6262] OBJ_camellia_128_ccm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x09, /* [6270] OBJ_camellia_128_ctr */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x0A, /* [6278] OBJ_camellia_128_cmac */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x1A, /* [6286] OBJ_camellia_192_gcm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x1B, /* [6294] OBJ_camellia_192_ccm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x1D, /* [6302] OBJ_camellia_192_ctr */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x1E, /* [6310] OBJ_camellia_192_cmac */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x2E, /* [6318] OBJ_camellia_256_gcm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x2F, /* [6326] OBJ_camellia_256_ccm */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x31, /* [6334] OBJ_camellia_256_ctr */ +0x03,0xA2,0x31,0x05,0x03,0x01,0x09,0x32, /* [6342] OBJ_camellia_256_cmac */ }; static const ASN1_OBJECT nid_objs[NUM_NID]={ @@ -2517,6 +2529,30 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={ {"AES-128-OCB","aes-128-ocb",NID_aes_128_ocb,0,NULL,0}, {"AES-192-OCB","aes-192-ocb",NID_aes_192_ocb,0,NULL,0}, {"AES-256-OCB","aes-256-ocb",NID_aes_256_ocb,0,NULL,0}, +{"CAMELLIA-128-GCM","camellia-128-gcm",NID_camellia_128_gcm,8, + &(lvalues[6254]),0}, +{"CAMELLIA-128-CCM","camellia-128-ccm",NID_camellia_128_ccm,8, + &(lvalues[6262]),0}, +{"CAMELLIA-128-CTR","camellia-128-ctr",NID_camellia_128_ctr,8, + &(lvalues[6270]),0}, +{"CAMELLIA-128-CMAC","camellia-128-cmac",NID_camellia_128_cmac,8, + &(lvalues[6278]),0}, +{"CAMELLIA-192-GCM","camellia-192-gcm",NID_camellia_192_gcm,8, + &(lvalues[6286]),0}, +{"CAMELLIA-192-CCM","camellia-192-ccm",NID_camellia_192_ccm,8, + &(lvalues[6294]),0}, +{"CAMELLIA-192-CTR","camellia-192-ctr",NID_camellia_192_ctr,8, + &(lvalues[6302]),0}, +{"CAMELLIA-192-CMAC","camellia-192-cmac",NID_camellia_192_cmac,8, + &(lvalues[6310]),0}, +{"CAMELLIA-256-GCM","camellia-256-gcm",NID_camellia_256_gcm,8, + &(lvalues[6318]),0}, +{"CAMELLIA-256-CCM","camellia-256-ccm",NID_camellia_256_ccm,8, + &(lvalues[6326]),0}, +{"CAMELLIA-256-CTR","camellia-256-ctr",NID_camellia_256_ctr,8, + &(lvalues[6334]),0}, +{"CAMELLIA-256-CMAC","camellia-256-cmac",NID_camellia_256_cmac,8, + &(lvalues[6342]),0}, }; static const unsigned int sn_objs[NUM_SN]={ @@ -2559,22 +2595,34 @@ static const unsigned int sn_objs[NUM_SN]={ 94, /* "BF-OFB" */ 14, /* "C" */ 751, /* "CAMELLIA-128-CBC" */ +962, /* "CAMELLIA-128-CCM" */ 757, /* "CAMELLIA-128-CFB" */ 760, /* "CAMELLIA-128-CFB1" */ 763, /* "CAMELLIA-128-CFB8" */ +964, /* "CAMELLIA-128-CMAC" */ +963, /* "CAMELLIA-128-CTR" */ 754, /* "CAMELLIA-128-ECB" */ +961, /* "CAMELLIA-128-GCM" */ 766, /* "CAMELLIA-128-OFB" */ 752, /* "CAMELLIA-192-CBC" */ +966, /* "CAMELLIA-192-CCM" */ 758, /* "CAMELLIA-192-CFB" */ 761, /* "CAMELLIA-192-CFB1" */ 764, /* "CAMELLIA-192-CFB8" */ +968, /* "CAMELLIA-192-CMAC" */ +967, /* "CAMELLIA-192-CTR" */ 755, /* "CAMELLIA-192-ECB" */ +965, /* "CAMELLIA-192-GCM" */ 767, /* "CAMELLIA-192-OFB" */ 753, /* "CAMELLIA-256-CBC" */ +970, /* "CAMELLIA-256-CCM" */ 759, /* "CAMELLIA-256-CFB" */ 762, /* "CAMELLIA-256-CFB1" */ 765, /* "CAMELLIA-256-CFB8" */ +972, /* "CAMELLIA-256-CMAC" */ +971, /* "CAMELLIA-256-CTR" */ 756, /* "CAMELLIA-256-ECB" */ +969, /* "CAMELLIA-256-GCM" */ 768, /* "CAMELLIA-256-OFB" */ 108, /* "CAST5-CBC" */ 110, /* "CAST5-CFB" */ @@ -3711,22 +3759,34 @@ static const unsigned int ln_objs[NUM_LN]={ 881, /* "cACertificate" */ 483, /* "cNAMERecord" */ 751, /* "camellia-128-cbc" */ +962, /* "camellia-128-ccm" */ 757, /* "camellia-128-cfb" */ 760, /* "camellia-128-cfb1" */ 763, /* "camellia-128-cfb8" */ +964, /* "camellia-128-cmac" */ +963, /* "camellia-128-ctr" */ 754, /* "camellia-128-ecb" */ +961, /* "camellia-128-gcm" */ 766, /* "camellia-128-ofb" */ 752, /* "camellia-192-cbc" */ +966, /* "camellia-192-ccm" */ 758, /* "camellia-192-cfb" */ 761, /* "camellia-192-cfb1" */ 764, /* "camellia-192-cfb8" */ +968, /* "camellia-192-cmac" */ +967, /* "camellia-192-ctr" */ 755, /* "camellia-192-ecb" */ +965, /* "camellia-192-gcm" */ 767, /* "camellia-192-ofb" */ 753, /* "camellia-256-cbc" */ +970, /* "camellia-256-ccm" */ 759, /* "camellia-256-cfb" */ 762, /* "camellia-256-cfb1" */ 765, /* "camellia-256-cfb8" */ +972, /* "camellia-256-cmac" */ +971, /* "camellia-256-ctr" */ 756, /* "camellia-256-ecb" */ +969, /* "camellia-256-gcm" */ 768, /* "camellia-256-ofb" */ 443, /* "caseIgnoreIA5StringSyntax" */ 108, /* "cast5-cbc" */ @@ -4838,12 +4898,24 @@ static const unsigned int obj_objs[NUM_OBJ]={ 754, /* OBJ_camellia_128_ecb 0 3 4401 5 3 1 9 1 */ 766, /* OBJ_camellia_128_ofb128 0 3 4401 5 3 1 9 3 */ 757, /* OBJ_camellia_128_cfb128 0 3 4401 5 3 1 9 4 */ +961, /* OBJ_camellia_128_gcm 0 3 4401 5 3 1 9 6 */ +962, /* OBJ_camellia_128_ccm 0 3 4401 5 3 1 9 7 */ +963, /* OBJ_camellia_128_ctr 0 3 4401 5 3 1 9 9 */ +964, /* OBJ_camellia_128_cmac 0 3 4401 5 3 1 9 10 */ 755, /* OBJ_camellia_192_ecb 0 3 4401 5 3 1 9 21 */ 767, /* OBJ_camellia_192_ofb128 0 3 4401 5 3 1 9 23 */ 758, /* OBJ_camellia_192_cfb128 0 3 4401 5 3 1 9 24 */ +965, /* OBJ_camellia_192_gcm 0 3 4401 5 3 1 9 26 */ +966, /* OBJ_camellia_192_ccm 0 3 4401 5 3 1 9 27 */ +967, /* OBJ_camellia_192_ctr 0 3 4401 5 3 1 9 29 */ +968, /* OBJ_camellia_192_cmac 0 3 4401 5 3 1 9 30 */ 756, /* OBJ_camellia_256_ecb 0 3 4401 5 3 1 9 41 */ 768, /* OBJ_camellia_256_ofb128 0 3 4401 5 3 1 9 43 */ 759, /* OBJ_camellia_256_cfb128 0 3 4401 5 3 1 9 44 */ +969, /* OBJ_camellia_256_gcm 0 3 4401 5 3 1 9 46 */ +970, /* OBJ_camellia_256_ccm 0 3 4401 5 3 1 9 47 */ +971, /* OBJ_camellia_256_ctr 0 3 4401 5 3 1 9 49 */ +972, /* OBJ_camellia_256_cmac 0 3 4401 5 3 1 9 50 */ 437, /* OBJ_pilot 0 9 2342 19200300 100 */ 776, /* OBJ_seed_ecb 1 2 410 200004 1 3 */ 777, /* OBJ_seed_cbc 1 2 410 200004 1 4 */ diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h index 55fc5ec689..e314f5c10c 100644 --- a/crypto/objects/obj_mac.h +++ b/crypto/objects/obj_mac.h @@ -3944,6 +3944,26 @@ #define NID_camellia_128_cfb128 757 #define OBJ_camellia_128_cfb128 OBJ_camellia,4L +#define SN_camellia_128_gcm "CAMELLIA-128-GCM" +#define LN_camellia_128_gcm "camellia-128-gcm" +#define NID_camellia_128_gcm 961 +#define OBJ_camellia_128_gcm OBJ_camellia,6L + +#define SN_camellia_128_ccm "CAMELLIA-128-CCM" +#define LN_camellia_128_ccm "camellia-128-ccm" +#define NID_camellia_128_ccm 962 +#define OBJ_camellia_128_ccm OBJ_camellia,7L + +#define SN_camellia_128_ctr "CAMELLIA-128-CTR" +#define LN_camellia_128_ctr "camellia-128-ctr" +#define NID_camellia_128_ctr 963 +#define OBJ_camellia_128_ctr OBJ_camellia,9L + +#define SN_camellia_128_cmac "CAMELLIA-128-CMAC" +#define LN_camellia_128_cmac "camellia-128-cmac" +#define NID_camellia_128_cmac 964 +#define OBJ_camellia_128_cmac OBJ_camellia,10L + #define SN_camellia_192_ecb "CAMELLIA-192-ECB" #define LN_camellia_192_ecb "camellia-192-ecb" #define NID_camellia_192_ecb 755 @@ -3959,6 +3979,26 @@ #define NID_camellia_192_cfb128 758 #define OBJ_camellia_192_cfb128 OBJ_camellia,24L +#define SN_camellia_192_gcm "CAMELLIA-192-GCM" +#define LN_camellia_192_gcm "camellia-192-gcm" +#define NID_camellia_192_gcm 965 +#define OBJ_camellia_192_gcm OBJ_camellia,26L + +#define SN_camellia_192_ccm "CAMELLIA-192-CCM" +#define LN_camellia_192_ccm "camellia-192-ccm" +#define NID_camellia_192_ccm 966 +#define OBJ_camellia_192_ccm OBJ_camellia,27L + +#define SN_camellia_192_ctr "CAMELLIA-192-CTR" +#define LN_camellia_192_ctr "camellia-192-ctr" +#define NID_camellia_192_ctr 967 +#define OBJ_camellia_192_ctr OBJ_camellia,29L + +#define SN_camellia_192_cmac "CAMELLIA-192-CMAC" +#define LN_camellia_192_cmac "camellia-192-cmac" +#define NID_camellia_192_cmac 968 +#define OBJ_camellia_192_cmac OBJ_camellia,30L + #define SN_camellia_256_ecb "CAMELLIA-256-ECB" #define LN_camellia_256_ecb "camellia-256-ecb" #define NID_camellia_256_ecb 756 @@ -3974,6 +4014,26 @@ #define NID_camellia_256_cfb128 759 #define OBJ_camellia_256_cfb128 OBJ_camellia,44L +#define SN_camellia_256_gcm "CAMELLIA-256-GCM" +#define LN_camellia_256_gcm "camellia-256-gcm" +#define NID_camellia_256_gcm 969 +#define OBJ_camellia_256_gcm OBJ_camellia,46L + +#define SN_camellia_256_ccm "CAMELLIA-256-CCM" +#define LN_camellia_256_ccm "camellia-256-ccm" +#define NID_camellia_256_ccm 970 +#define OBJ_camellia_256_ccm OBJ_camellia,47L + +#define SN_camellia_256_ctr "CAMELLIA-256-CTR" +#define LN_camellia_256_ctr "camellia-256-ctr" +#define NID_camellia_256_ctr 971 +#define OBJ_camellia_256_ctr OBJ_camellia,49L + +#define SN_camellia_256_cmac "CAMELLIA-256-CMAC" +#define LN_camellia_256_cmac "camellia-256-cmac" +#define NID_camellia_256_cmac 972 +#define OBJ_camellia_256_cmac OBJ_camellia,50L + #define SN_camellia_128_cfb1 "CAMELLIA-128-CFB1" #define LN_camellia_128_cfb1 "camellia-128-cfb1" #define NID_camellia_128_cfb1 760 diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num index 648e2df1c7..f4fe14f5f6 100644 --- a/crypto/objects/obj_mac.num +++ b/crypto/objects/obj_mac.num @@ -958,3 +958,15 @@ jurisdictionCountryName 957 aes_128_ocb 958 aes_192_ocb 959 aes_256_ocb 960 +camellia_128_gcm 961 +camellia_128_ccm 962 +camellia_128_ctr 963 +camellia_128_cmac 964 +camellia_192_gcm 965 +camellia_192_ccm 966 +camellia_192_ctr 967 +camellia_192_cmac 968 +camellia_256_gcm 969 +camellia_256_ccm 970 +camellia_256_ctr 971 +camellia_256_cmac 972 diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt index a4af282173..ee389100ba 100644 --- a/crypto/objects/objects.txt +++ b/crypto/objects/objects.txt @@ -1251,18 +1251,30 @@ camellia 1 : CAMELLIA-128-ECB : camellia-128-ecb camellia 3 : CAMELLIA-128-OFB : camellia-128-ofb !Cname camellia-128-cfb128 camellia 4 : CAMELLIA-128-CFB : camellia-128-cfb +camellia 6 : CAMELLIA-128-GCM : camellia-128-gcm +camellia 7 : CAMELLIA-128-CCM : camellia-128-ccm +camellia 9 : CAMELLIA-128-CTR : camellia-128-ctr +camellia 10 : CAMELLIA-128-CMAC : camellia-128-cmac camellia 21 : CAMELLIA-192-ECB : camellia-192-ecb !Cname camellia-192-ofb128 camellia 23 : CAMELLIA-192-OFB : camellia-192-ofb !Cname camellia-192-cfb128 camellia 24 : CAMELLIA-192-CFB : camellia-192-cfb +camellia 26 : CAMELLIA-192-GCM : camellia-192-gcm +camellia 27 : CAMELLIA-192-CCM : camellia-192-ccm +camellia 29 : CAMELLIA-192-CTR : camellia-192-ctr +camellia 30 : CAMELLIA-192-CMAC : camellia-192-cmac camellia 41 : CAMELLIA-256-ECB : camellia-256-ecb !Cname camellia-256-ofb128 camellia 43 : CAMELLIA-256-OFB : camellia-256-ofb !Cname camellia-256-cfb128 camellia 44 : CAMELLIA-256-CFB : camellia-256-cfb +camellia 46 : CAMELLIA-256-GCM : camellia-256-gcm +camellia 47 : CAMELLIA-256-CCM : camellia-256-ccm +camellia 49 : CAMELLIA-256-CTR : camellia-256-ctr +camellia 50 : CAMELLIA-256-CMAC : camellia-256-cmac # There are no OIDs for these modes... -- 2.40.0