Commit e5a4de9e authored by Andy Polyakov's avatar Andy Polyakov
Browse files

Add assigned OIDs, as well as "anonymous" ones for AES counter mode.

parent 7d3d1788
Loading
Loading
Loading
Loading
+80 −5
Original line number Diff line number Diff line
@@ -62,12 +62,12 @@
 * [including the GNU Public Licence.]
 */

#define NUM_NID 895
#define NUM_SN 888
#define NUM_LN 888
#define NUM_OBJ 841
#define NUM_NID 910
#define NUM_SN 903
#define NUM_LN 903
#define NUM_OBJ 853

static const unsigned char lvalues[5835]={
static const unsigned char lvalues[5949]={
0x00,                                        /* [  0] OBJ_undef */
0x2A,0x86,0x48,0x86,0xF7,0x0D,               /* [  1] OBJ_rsadsi */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,          /* [  7] OBJ_pkcs */
@@ -909,6 +909,18 @@ static const unsigned char lvalues[5835]={
0x55,0x04,0x35,                              /* [5817] OBJ_deltaRevocationList */
0x55,0x04,0x36,                              /* [5820] OBJ_dmdName */
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x09,/* [5823] OBJ_id_alg_PWRI_KEK */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x06,/* [5834] OBJ_aes_128_gcm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x07,/* [5843] OBJ_aes_128_ccm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x08,/* [5852] OBJ_id_aes128_wrap_pad */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1A,/* [5861] OBJ_aes_192_gcm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1B,/* [5870] OBJ_aes_192_ccm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1C,/* [5879] OBJ_id_aes192_wrap_pad */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2E,/* [5888] OBJ_aes_256_gcm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2F,/* [5897] OBJ_aes_256_ccm */
0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x30,/* [5906] OBJ_id_aes256_wrap_pad */
0x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x02,/* [5915] OBJ_id_camellia128_wrap */
0x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x03,/* [5926] OBJ_id_camellia192_wrap */
0x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x04,/* [5937] OBJ_id_camellia256_wrap */
};

static const ASN1_OBJECT nid_objs[NUM_NID]={
@@ -2355,6 +2367,27 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
{"id-alg-PWRI-KEK","id-alg-PWRI-KEK",NID_id_alg_PWRI_KEK,11,
	&(lvalues[5823]),0},
{"CMAC","cmac",NID_cmac,0,NULL,0},
{"id-aes128-GCM","aes-128-gcm",NID_aes_128_gcm,9,&(lvalues[5834]),0},
{"id-aes128-CCM","aes-128-ccm",NID_aes_128_ccm,9,&(lvalues[5843]),0},
{"id-aes128-wrap-pad","id-aes128-wrap-pad",NID_id_aes128_wrap_pad,9,
	&(lvalues[5852]),0},
{"id-aes192-GCM","aes-192-gcm",NID_aes_192_gcm,9,&(lvalues[5861]),0},
{"id-aes192-CCM","aes-192-ccm",NID_aes_192_ccm,9,&(lvalues[5870]),0},
{"id-aes192-wrap-pad","id-aes192-wrap-pad",NID_id_aes192_wrap_pad,9,
	&(lvalues[5879]),0},
{"id-aes256-GCM","aes-256-gcm",NID_aes_256_gcm,9,&(lvalues[5888]),0},
{"id-aes256-CCM","aes-256-ccm",NID_aes_256_ccm,9,&(lvalues[5897]),0},
{"id-aes256-wrap-pad","id-aes256-wrap-pad",NID_id_aes256_wrap_pad,9,
	&(lvalues[5906]),0},
{"AES-128-CTR","aes-128-ctr",NID_aes_128_ctr,0,NULL,0},
{"AES-192-CTR","aes-192-ctr",NID_aes_192_ctr,0,NULL,0},
{"AES-256-CTR","aes-256-ctr",NID_aes_256_ctr,0,NULL,0},
{"id-camellia128-wrap","id-camellia128-wrap",NID_id_camellia128_wrap,
	11,&(lvalues[5915]),0},
{"id-camellia192-wrap","id-camellia192-wrap",NID_id_camellia192_wrap,
	11,&(lvalues[5926]),0},
{"id-camellia256-wrap","id-camellia256-wrap",NID_id_camellia256_wrap,
	11,&(lvalues[5937]),0},
};

static const unsigned int sn_objs[NUM_SN]={
@@ -2363,18 +2396,21 @@ static const unsigned int sn_objs[NUM_SN]={
421,	/* "AES-128-CFB" */
650,	/* "AES-128-CFB1" */
653,	/* "AES-128-CFB8" */
904,	/* "AES-128-CTR" */
418,	/* "AES-128-ECB" */
420,	/* "AES-128-OFB" */
423,	/* "AES-192-CBC" */
425,	/* "AES-192-CFB" */
651,	/* "AES-192-CFB1" */
654,	/* "AES-192-CFB8" */
905,	/* "AES-192-CTR" */
422,	/* "AES-192-ECB" */
424,	/* "AES-192-OFB" */
427,	/* "AES-256-CBC" */
429,	/* "AES-256-CFB" */
652,	/* "AES-256-CFB1" */
655,	/* "AES-256-CFB8" */
906,	/* "AES-256-CTR" */
426,	/* "AES-256-ECB" */
428,	/* "AES-256-OFB" */
91,	/* "BF-CBC" */
@@ -2721,15 +2757,27 @@ static const unsigned int sn_objs[NUM_SN]={
357,	/* "id-aca-group" */
358,	/* "id-aca-role" */
176,	/* "id-ad" */
896,	/* "id-aes128-CCM" */
895,	/* "id-aes128-GCM" */
788,	/* "id-aes128-wrap" */
897,	/* "id-aes128-wrap-pad" */
899,	/* "id-aes192-CCM" */
898,	/* "id-aes192-GCM" */
789,	/* "id-aes192-wrap" */
900,	/* "id-aes192-wrap-pad" */
902,	/* "id-aes256-CCM" */
901,	/* "id-aes256-GCM" */
790,	/* "id-aes256-wrap" */
903,	/* "id-aes256-wrap-pad" */
262,	/* "id-alg" */
893,	/* "id-alg-PWRI-KEK" */
323,	/* "id-alg-des40" */
326,	/* "id-alg-dh-pop" */
325,	/* "id-alg-dh-sig-hmac-sha1" */
324,	/* "id-alg-noSignature" */
907,	/* "id-camellia128-wrap" */
908,	/* "id-camellia192-wrap" */
909,	/* "id-camellia256-wrap" */
268,	/* "id-cct" */
361,	/* "id-cct-PKIData" */
362,	/* "id-cct-PKIResponse" */
@@ -3392,22 +3440,31 @@ static const unsigned int ln_objs[NUM_LN]={
364,	/* "ad dvcs" */
606,	/* "additional verification" */
419,	/* "aes-128-cbc" */
896,	/* "aes-128-ccm" */
421,	/* "aes-128-cfb" */
650,	/* "aes-128-cfb1" */
653,	/* "aes-128-cfb8" */
904,	/* "aes-128-ctr" */
418,	/* "aes-128-ecb" */
895,	/* "aes-128-gcm" */
420,	/* "aes-128-ofb" */
423,	/* "aes-192-cbc" */
899,	/* "aes-192-ccm" */
425,	/* "aes-192-cfb" */
651,	/* "aes-192-cfb1" */
654,	/* "aes-192-cfb8" */
905,	/* "aes-192-ctr" */
422,	/* "aes-192-ecb" */
898,	/* "aes-192-gcm" */
424,	/* "aes-192-ofb" */
427,	/* "aes-256-cbc" */
902,	/* "aes-256-ccm" */
429,	/* "aes-256-cfb" */
652,	/* "aes-256-cfb1" */
655,	/* "aes-256-cfb8" */
906,	/* "aes-256-ctr" */
426,	/* "aes-256-ecb" */
901,	/* "aes-256-gcm" */
428,	/* "aes-256-ofb" */
376,	/* "algorithm" */
484,	/* "associatedDomain" */
@@ -3609,14 +3666,20 @@ static const unsigned int ln_objs[NUM_LN]={
358,	/* "id-aca-role" */
176,	/* "id-ad" */
788,	/* "id-aes128-wrap" */
897,	/* "id-aes128-wrap-pad" */
789,	/* "id-aes192-wrap" */
900,	/* "id-aes192-wrap-pad" */
790,	/* "id-aes256-wrap" */
903,	/* "id-aes256-wrap-pad" */
262,	/* "id-alg" */
893,	/* "id-alg-PWRI-KEK" */
323,	/* "id-alg-des40" */
326,	/* "id-alg-dh-pop" */
325,	/* "id-alg-dh-sig-hmac-sha1" */
324,	/* "id-alg-noSignature" */
907,	/* "id-camellia128-wrap" */
908,	/* "id-camellia192-wrap" */
909,	/* "id-camellia256-wrap" */
268,	/* "id-cct" */
361,	/* "id-cct-PKIData" */
362,	/* "id-cct-PKIResponse" */
@@ -4793,16 +4856,25 @@ static const unsigned int obj_objs[NUM_OBJ]={
420,	/* OBJ_aes_128_ofb128               2 16 840 1 101 3 4 1 3 */
421,	/* OBJ_aes_128_cfb128               2 16 840 1 101 3 4 1 4 */
788,	/* OBJ_id_aes128_wrap               2 16 840 1 101 3 4 1 5 */
895,	/* OBJ_aes_128_gcm                  2 16 840 1 101 3 4 1 6 */
896,	/* OBJ_aes_128_ccm                  2 16 840 1 101 3 4 1 7 */
897,	/* OBJ_id_aes128_wrap_pad           2 16 840 1 101 3 4 1 8 */
422,	/* OBJ_aes_192_ecb                  2 16 840 1 101 3 4 1 21 */
423,	/* OBJ_aes_192_cbc                  2 16 840 1 101 3 4 1 22 */
424,	/* OBJ_aes_192_ofb128               2 16 840 1 101 3 4 1 23 */
425,	/* OBJ_aes_192_cfb128               2 16 840 1 101 3 4 1 24 */
789,	/* OBJ_id_aes192_wrap               2 16 840 1 101 3 4 1 25 */
898,	/* OBJ_aes_192_gcm                  2 16 840 1 101 3 4 1 26 */
899,	/* OBJ_aes_192_ccm                  2 16 840 1 101 3 4 1 27 */
900,	/* OBJ_id_aes192_wrap_pad           2 16 840 1 101 3 4 1 28 */
426,	/* OBJ_aes_256_ecb                  2 16 840 1 101 3 4 1 41 */
427,	/* OBJ_aes_256_cbc                  2 16 840 1 101 3 4 1 42 */
428,	/* OBJ_aes_256_ofb128               2 16 840 1 101 3 4 1 43 */
429,	/* OBJ_aes_256_cfb128               2 16 840 1 101 3 4 1 44 */
790,	/* OBJ_id_aes256_wrap               2 16 840 1 101 3 4 1 45 */
901,	/* OBJ_aes_256_gcm                  2 16 840 1 101 3 4 1 46 */
902,	/* OBJ_aes_256_ccm                  2 16 840 1 101 3 4 1 47 */
903,	/* OBJ_id_aes256_wrap_pad           2 16 840 1 101 3 4 1 48 */
672,	/* OBJ_sha256                       2 16 840 1 101 3 4 2 1 */
673,	/* OBJ_sha384                       2 16 840 1 101 3 4 2 2 */
674,	/* OBJ_sha512                       2 16 840 1 101 3 4 2 3 */
@@ -4909,6 +4981,9 @@ static const unsigned int obj_objs[NUM_OBJ]={
751,	/* OBJ_camellia_128_cbc             1 2 392 200011 61 1 1 1 2 */
752,	/* OBJ_camellia_192_cbc             1 2 392 200011 61 1 1 1 3 */
753,	/* OBJ_camellia_256_cbc             1 2 392 200011 61 1 1 1 4 */
907,	/* OBJ_id_camellia128_wrap          1 2 392 200011 61 1 1 3 2 */
908,	/* OBJ_id_camellia192_wrap          1 2 392 200011 61 1 1 3 3 */
909,	/* OBJ_id_camellia256_wrap          1 2 392 200011 61 1 1 3 4 */
196,	/* OBJ_id_smime_mod_cms             1 2 840 113549 1 9 16 0 1 */
197,	/* OBJ_id_smime_mod_ess             1 2 840 113549 1 9 16 0 2 */
198,	/* OBJ_id_smime_mod_oid             1 2 840 113549 1 9 16 0 3 */
+78 −12
Original line number Diff line number Diff line
@@ -2590,6 +2590,24 @@
#define NID_aes_128_cfb128		421
#define OBJ_aes_128_cfb128		OBJ_aes,4L

#define SN_id_aes128_wrap		"id-aes128-wrap"
#define NID_id_aes128_wrap		788
#define OBJ_id_aes128_wrap		OBJ_aes,5L

#define SN_aes_128_gcm		"id-aes128-GCM"
#define LN_aes_128_gcm		"aes-128-gcm"
#define NID_aes_128_gcm		895
#define OBJ_aes_128_gcm		OBJ_aes,6L

#define SN_aes_128_ccm		"id-aes128-CCM"
#define LN_aes_128_ccm		"aes-128-ccm"
#define NID_aes_128_ccm		896
#define OBJ_aes_128_ccm		OBJ_aes,7L

#define SN_id_aes128_wrap_pad		"id-aes128-wrap-pad"
#define NID_id_aes128_wrap_pad		897
#define OBJ_id_aes128_wrap_pad		OBJ_aes,8L

#define SN_aes_192_ecb		"AES-192-ECB"
#define LN_aes_192_ecb		"aes-192-ecb"
#define NID_aes_192_ecb		422
@@ -2610,6 +2628,24 @@
#define NID_aes_192_cfb128		425
#define OBJ_aes_192_cfb128		OBJ_aes,24L

#define SN_id_aes192_wrap		"id-aes192-wrap"
#define NID_id_aes192_wrap		789
#define OBJ_id_aes192_wrap		OBJ_aes,25L

#define SN_aes_192_gcm		"id-aes192-GCM"
#define LN_aes_192_gcm		"aes-192-gcm"
#define NID_aes_192_gcm		898
#define OBJ_aes_192_gcm		OBJ_aes,26L

#define SN_aes_192_ccm		"id-aes192-CCM"
#define LN_aes_192_ccm		"aes-192-ccm"
#define NID_aes_192_ccm		899
#define OBJ_aes_192_ccm		OBJ_aes,27L

#define SN_id_aes192_wrap_pad		"id-aes192-wrap-pad"
#define NID_id_aes192_wrap_pad		900
#define OBJ_id_aes192_wrap_pad		OBJ_aes,28L

#define SN_aes_256_ecb		"AES-256-ECB"
#define LN_aes_256_ecb		"aes-256-ecb"
#define NID_aes_256_ecb		426
@@ -2630,6 +2666,24 @@
#define NID_aes_256_cfb128		429
#define OBJ_aes_256_cfb128		OBJ_aes,44L

#define SN_id_aes256_wrap		"id-aes256-wrap"
#define NID_id_aes256_wrap		790
#define OBJ_id_aes256_wrap		OBJ_aes,45L

#define SN_aes_256_gcm		"id-aes256-GCM"
#define LN_aes_256_gcm		"aes-256-gcm"
#define NID_aes_256_gcm		901
#define OBJ_aes_256_gcm		OBJ_aes,46L

#define SN_aes_256_ccm		"id-aes256-CCM"
#define LN_aes_256_ccm		"aes-256-ccm"
#define NID_aes_256_ccm		902
#define OBJ_aes_256_ccm		OBJ_aes,47L

#define SN_id_aes256_wrap_pad		"id-aes256-wrap-pad"
#define NID_id_aes256_wrap_pad		903
#define OBJ_id_aes256_wrap_pad		OBJ_aes,48L

#define SN_aes_128_cfb1		"AES-128-CFB1"
#define LN_aes_128_cfb1		"aes-128-cfb1"
#define NID_aes_128_cfb1		650
@@ -2654,6 +2708,18 @@
#define LN_aes_256_cfb8		"aes-256-cfb8"
#define NID_aes_256_cfb8		655

#define SN_aes_128_ctr		"AES-128-CTR"
#define LN_aes_128_ctr		"aes-128-ctr"
#define NID_aes_128_ctr		904

#define SN_aes_192_ctr		"AES-192-CTR"
#define LN_aes_192_ctr		"aes-192-ctr"
#define NID_aes_192_ctr		905

#define SN_aes_256_ctr		"AES-256-CTR"
#define LN_aes_256_ctr		"aes-256-ctr"
#define NID_aes_256_ctr		906

#define SN_des_cfb1		"DES-CFB1"
#define LN_des_cfb1		"des-cfb1"
#define NID_des_cfb1		656
@@ -2670,18 +2736,6 @@
#define LN_des_ede3_cfb8		"des-ede3-cfb8"
#define NID_des_ede3_cfb8		659

#define SN_id_aes128_wrap		"id-aes128-wrap"
#define NID_id_aes128_wrap		788
#define OBJ_id_aes128_wrap		OBJ_aes,5L

#define SN_id_aes192_wrap		"id-aes192-wrap"
#define NID_id_aes192_wrap		789
#define OBJ_id_aes192_wrap		OBJ_aes,25L

#define SN_id_aes256_wrap		"id-aes256-wrap"
#define NID_id_aes256_wrap		790
#define OBJ_id_aes256_wrap		OBJ_aes,45L

#define OBJ_nist_hashalgs		OBJ_nistAlgorithms,2L

#define SN_sha256		"SHA256"
@@ -3814,6 +3868,18 @@
#define NID_camellia_256_cbc		753
#define OBJ_camellia_256_cbc		1L,2L,392L,200011L,61L,1L,1L,1L,4L

#define SN_id_camellia128_wrap		"id-camellia128-wrap"
#define NID_id_camellia128_wrap		907
#define OBJ_id_camellia128_wrap		1L,2L,392L,200011L,61L,1L,1L,3L,2L

#define SN_id_camellia192_wrap		"id-camellia192-wrap"
#define NID_id_camellia192_wrap		908
#define OBJ_id_camellia192_wrap		1L,2L,392L,200011L,61L,1L,1L,3L,3L

#define SN_id_camellia256_wrap		"id-camellia256-wrap"
#define NID_id_camellia256_wrap		909
#define OBJ_id_camellia256_wrap		1L,2L,392L,200011L,61L,1L,1L,3L,4L

#define OBJ_ntt_ds		0L,3L,4401L,5L

#define OBJ_camellia		OBJ_ntt_ds,3L,1L,9L
+15 −0
Original line number Diff line number Diff line
@@ -892,3 +892,18 @@ deltaRevocationList 891
dmdName		892
id_alg_PWRI_KEK		893
cmac		894
aes_128_gcm		895
aes_128_ccm		896
id_aes128_wrap_pad		897
aes_192_gcm		898
aes_192_ccm		899
id_aes192_wrap_pad		900
aes_256_gcm		901
aes_256_ccm		902
id_aes256_wrap_pad		903
aes_128_ctr		904
aes_192_ctr		905
aes_256_ctr		906
id_camellia128_wrap		907
id_camellia192_wrap		908
id_camellia256_wrap		909
+18 −4
Original line number Diff line number Diff line
@@ -847,6 +847,10 @@ aes 2 : AES-128-CBC : aes-128-cbc
aes 3			: AES-128-OFB		: aes-128-ofb
!Cname aes-128-cfb128
aes 4			: AES-128-CFB		: aes-128-cfb
aes 5			: id-aes128-wrap
aes 6			: id-aes128-GCM		: aes-128-gcm
aes 7			: id-aes128-CCM		: aes-128-ccm
aes 8			: id-aes128-wrap-pad

aes 21			: AES-192-ECB		: aes-192-ecb
aes 22			: AES-192-CBC		: aes-192-cbc
@@ -854,6 +858,10 @@ aes 22 : AES-192-CBC : aes-192-cbc
aes 23			: AES-192-OFB		: aes-192-ofb
!Cname aes-192-cfb128
aes 24			: AES-192-CFB		: aes-192-cfb
aes 25			: id-aes192-wrap
aes 26			: id-aes192-GCM		: aes-192-gcm
aes 27			: id-aes192-CCM		: aes-192-ccm
aes 28			: id-aes192-wrap-pad

aes 41			: AES-256-ECB		: aes-256-ecb
aes 42			: AES-256-CBC		: aes-256-cbc
@@ -861,6 +869,10 @@ aes 42 : AES-256-CBC : aes-256-cbc
aes 43			: AES-256-OFB		: aes-256-ofb
!Cname aes-256-cfb128
aes 44			: AES-256-CFB		: aes-256-cfb
aes 45			: id-aes256-wrap
aes 46			: id-aes256-GCM		: aes-256-gcm
aes 47			: id-aes256-CCM		: aes-256-ccm
aes 48			: id-aes256-wrap-pad

# There are no OIDs for these modes...

@@ -870,15 +882,14 @@ aes 44 : AES-256-CFB : aes-256-cfb
			: AES-128-CFB8		: aes-128-cfb8
			: AES-192-CFB8		: aes-192-cfb8
			: AES-256-CFB8		: aes-256-cfb8
			: AES-128-CTR		: aes-128-ctr
			: AES-192-CTR		: aes-192-ctr
			: AES-256-CTR		: aes-256-ctr
			: DES-CFB1		: des-cfb1
			: DES-CFB8		: des-cfb8
			: DES-EDE3-CFB1		: des-ede3-cfb1
			: DES-EDE3-CFB8		: des-ede3-cfb8

aes 5			: id-aes128-wrap 
aes 25			: id-aes192-wrap 
aes 45			: id-aes256-wrap 

# OIDs for SHA224, SHA256, SHA385 and SHA512, according to x9.84.
!Alias nist_hashalgs nistAlgorithms 2
nist_hashalgs 1		: SHA256		: sha256
@@ -1212,6 +1223,9 @@ cryptocom 1 8 1 : id-GostR3410-2001-ParamSet-cc : GOST R 3410-2001 Parameter Se
1 2 392 200011 61 1 1 1 2 : CAMELLIA-128-CBC		: camellia-128-cbc
1 2 392 200011 61 1 1 1 3 : CAMELLIA-192-CBC		: camellia-192-cbc
1 2 392 200011 61 1 1 1 4 : CAMELLIA-256-CBC		: camellia-256-cbc
1 2 392 200011 61 1 1 3 2 : id-camellia128-wrap
1 2 392 200011 61 1 1 3 3 : id-camellia192-wrap
1 2 392 200011 61 1 1 3 4 : id-camellia256-wrap

# Definitions for Camellia cipher - ECB, CFB, OFB MODE