diff -ur openssl-1.0.0a-orig/crypto/ec/ec_curve.c openssl-1.0.0a/crypto/ec/ec_curve.c
--- openssl-1.0.0a-orig/crypto/ec/ec_curve.c 2007-08-31 11:36:43.000000000 +0200
+++ openssl-1.0.0a/crypto/ec/ec_curve.c 2010-10-09 09:50:21.000000000 +0200
@@ -1817,6 +1817,484 @@
0xBA,0xFC,0xA7,0x5E }
};
+/* Brainpool Elliptic Curves (according to RFC 5639) */
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+20*6]; }
+ _EC_BRAINPOOL_P160_R1 = {
+ { NID_X9_62_prime_field,0,20,1 }, // cofactor h=1, seed absent
+ { 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF,
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0F,
+
+ 0x34,0x0E,0x7B,0xE2,0xA2,0x80,0xEB,0x74,0xE2,0xBE,
+ 0x61,0xBA,0xDA,0x74,0x5D,0x97,0xE8,0xF7,0xC3,0x00,
+
+ 0x1E,0x58,0x9A,0x85,0x95,0x42,0x34,0x12,0x13,0x4F,
+ 0xAA,0x2D,0xBD,0xEC,0x95,0xC8,0xD8,0x67,0x5E,0x58,
+
+ 0xBE,0xD5,0xAF,0x16,0xEA,0x3F,0x6A,0x4F,0x62,0x93,
+ 0x8C,0x46,0x31,0xEB,0x5A,0xF7,0xBD,0xBC,0xDB,0xC3,
+
+ 0x16,0x67,0xCB,0x47,0x7A,0x1A,0x8E,0xC3,0x38,0xF9,
+ 0x47,0x41,0x66,0x9C,0x97,0x63,0x16,0xDA,0x63,0x21,
+
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF,
+ 0x59,0x91,0xD4,0x50,0x29,0x40,0x9E,0x60,0xFC,0x09 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+20*6]; }
+ _EC_BRAINPOOL_P160_T1 = {
+ { NID_X9_62_prime_field,0,20,1 }, // cofactor h=1, seed absent
+ { 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF,
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0F,
+
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF,
+ 0xC7,0xAD,0x95,0xB3,0xD8,0x13,0x95,0x15,0x62,0x0C,
+
+ 0x7A,0x55,0x6B,0x6D,0xAE,0x53,0x5B,0x7B,0x51,0xED,
+ 0x2C,0x4D,0x7D,0xAA,0x7A,0x0B,0x5C,0x55,0xF3,0x80,
+
+ 0xB1,0x99,0xB1,0x3B,0x9B,0x34,0xEF,0xC1,0x39,0x7E,
+ 0x64,0xBA,0xEB,0x05,0xAC,0xC2,0x65,0xFF,0x23,0x78,
+
+ 0xAD,0xD6,0x71,0x8B,0x7C,0x7C,0x19,0x61,0xF0,0x99,
+ 0x1B,0x84,0x24,0x43,0x77,0x21,0x52,0xC9,0xE0,0xAD,
+
+ 0xE9,0x5E,0x4A,0x5F,0x73,0x70,0x59,0xDC,0x60,0xDF,
+ 0x59,0x91,0xD4,0x50,0x29,0x40,0x9E,0x60,0xFC,0x09 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+24*6]; }
+ _EC_BRAINPOOL_P192_R1 = {
+ { NID_X9_62_prime_field,0,24,1 }, // cofactor h=1, seed absent
+ { 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3,
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
+ 0xE1,0xA8,0x62,0x97,
+
+ 0x6A,0x91,0x17,0x40,0x76,0xB1,0xE0,0xE1,0x9C,0x39,
+ 0xC0,0x31,0xFE,0x86,0x85,0xC1,0xCA,0xE0,0x40,0xE5,
+ 0xC6,0x9A,0x28,0xEF,
+
+ 0x46,0x9A,0x28,0xEF,0x7C,0x28,0xCC,0xA3,0xDC,0x72,
+ 0x1D,0x04,0x4F,0x44,0x96,0xBC,0xCA,0x7E,0xF4,0x14,
+ 0x6F,0xBF,0x25,0xC9,
+
+ 0xC0,0xA0,0x64,0x7E,0xAA,0xB6,0xA4,0x87,0x53,0xB0,
+ 0x33,0xC5,0x6C,0xB0,0xF0,0x90,0x0A,0x2F,0x5C,0x48,
+ 0x53,0x37,0x5F,0xD6,
+
+ 0x14,0xB6,0x90,0x86,0x6A,0xBD,0x5B,0xB8,0x8B,0x5F,
+ 0x48,0x28,0xC1,0x49,0x00,0x02,0xE6,0x77,0x3F,0xA2,
+ 0xFA,0x29,0x9B,0x8F,
+
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3,
+ 0x46,0x2F,0x9E,0x9E,0x91,0x6B,0x5B,0xE8,0xF1,0x02,
+ 0x9A,0xC4,0xAC,0xC1 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+24*6]; }
+ _EC_BRAINPOOL_P192_T1 = {
+ { NID_X9_62_prime_field,0,24,1 }, // cofactor h=1, seed absent
+ { 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3,
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
+ 0xE1,0xA8,0x62,0x97,
+
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3,
+ 0x46,0x30,0x93,0xD1,0x8D,0xB7,0x8F,0xCE,0x47,0x6D,
+ 0xE1,0xA8,0x62,0x94,
+
+ 0x13,0xD5,0x6F,0xFA,0xEC,0x78,0x68,0x1E,0x68,0xF9,
+ 0xDE,0xB4,0x3B,0x35,0xBE,0xC2,0xFB,0x68,0x54,0x2E,
+ 0x27,0x89,0x7B,0x79,
+
+ 0x3A,0xE9,0xE5,0x8C,0x82,0xF6,0x3C,0x30,0x28,0x2E,
+ 0x1F,0xE7,0xBB,0xF4,0x3F,0xA7,0x2C,0x44,0x6A,0xF6,
+ 0xF4,0x61,0x81,0x29,
+
+ 0x09,0x7E,0x2C,0x56,0x67,0xC2,0x22,0x3A,0x90,0x2A,
+ 0xB5,0xCA,0x44,0x9D,0x00,0x84,0xB7,0xE5,0xB3,0xDE,
+ 0x7C,0xCC,0x01,0xC9,
+
+ 0xC3,0x02,0xF4,0x1D,0x93,0x2A,0x36,0xCD,0xA7,0xA3,
+ 0x46,0x2F,0x9E,0x9E,0x91,0x6B,0x5B,0xE8,0xF1,0x02,
+ 0x9A,0xC4,0xAC,0xC1 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+28*6]; }
+ _EC_BRAINPOOL_P224_R1 = {
+ { NID_X9_62_prime_field,0,28,1 }, // cofactor h=1, seed absent
+ { 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18,
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFF,
+
+ 0x68,0xA5,0xE6,0x2C,0xA9,0xCE,0x6C,0x1C,0x29,0x98,
+ 0x03,0xA6,0xC1,0x53,0x0B,0x51,0x4E,0x18,0x2A,0xD8,
+ 0xB0,0x04,0x2A,0x59,0xCA,0xD2,0x9F,0x43,
+
+ 0x25,0x80,0xF6,0x3C,0xCF,0xE4,0x41,0x38,0x87,0x07,
+ 0x13,0xB1,0xA9,0x23,0x69,0xE3,0x3E,0x21,0x35,0xD2,
+ 0x66,0xDB,0xB3,0x72,0x38,0x6C,0x40,0x0B,
+
+ 0x0D,0x90,0x29,0xAD,0x2C,0x7E,0x5C,0xF4,0x34,0x08,
+ 0x23,0xB2,0xA8,0x7D,0xC6,0x8C,0x9E,0x4C,0xE3,0x17,
+ 0x4C,0x1E,0x6E,0xFD,0xEE,0x12,0xC0,0x7D,
+
+ 0x58,0xAA,0x56,0xF7,0x72,0xC0,0x72,0x6F,0x24,0xC6,
+ 0xB8,0x9E,0x4E,0xCD,0xAC,0x24,0x35,0x4B,0x9E,0x99,
+ 0xCA,0xA3,0xF6,0xD3,0x76,0x14,0x02,0xCD,
+
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18,
+ 0x30,0x25,0x75,0xD0,0xFB,0x98,0xD1,0x16,0xBC,0x4B,
+ 0x6D,0xDE,0xBC,0xA3,0xA5,0xA7,0x93,0x9F }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+28*6]; }
+ _EC_BRAINPOOL_P224_T1 = {
+ { NID_X9_62_prime_field,0,28,1 }, // cofactor h=1, seed absent
+ { 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18,
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFF,
+
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18,
+ 0x30,0x25,0x75,0xD1,0xD7,0x87,0xB0,0x9F,0x07,0x57,
+ 0x97,0xDA,0x89,0xF5,0x7E,0xC8,0xC0,0xFC,
+
+ 0x4B,0x33,0x7D,0x93,0x41,0x04,0xCD,0x7B,0xEF,0x27,
+ 0x1B,0xF6,0x0C,0xED,0x1E,0xD2,0x0D,0xA1,0x4C,0x08,
+ 0xB3,0xBB,0x64,0xF1,0x8A,0x60,0x88,0x8D,
+
+ 0x6A,0xB1,0xE3,0x44,0xCE,0x25,0xFF,0x38,0x96,0x42,
+ 0x4E,0x7F,0xFE,0x14,0x76,0x2E,0xCB,0x49,0xF8,0x92,
+ 0x8A,0xC0,0xC7,0x60,0x29,0xB4,0xD5,0x80,
+
+ 0x03,0x74,0xE9,0xF5,0x14,0x3E,0x56,0x8C,0xD2,0x3F,
+ 0x3F,0x4D,0x7C,0x0D,0x4B,0x1E,0x41,0xC8,0xCC,0x0D,
+ 0x1C,0x6A,0xBD,0x5F,0x1A,0x46,0xDB,0x4C,
+
+ 0xD7,0xC1,0x34,0xAA,0x26,0x43,0x66,0x86,0x2A,0x18,
+ 0x30,0x25,0x75,0xD0,0xFB,0x98,0xD1,0x16,0xBC,0x4B,
+ 0x6D,0xDE,0xBC,0xA3,0xA5,0xA7,0x93,0x9F }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+32*6]; }
+ _EC_BRAINPOOL_P256_R1 = {
+ { NID_X9_62_prime_field,0,32,1 }, // cofactor h=1, seed absent
+ { 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66,
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
+ 0x53,0x77,
+
+ 0x7D,0x5A,0x09,0x75,0xFC,0x2C,0x30,0x57,0xEE,0xF6,
+ 0x75,0x30,0x41,0x7A,0xFF,0xE7,0xFB,0x80,0x55,0xC1,
+ 0x26,0xDC,0x5C,0x6C,0xE9,0x4A,0x4B,0x44,0xF3,0x30,
+ 0xB5,0xD9,
+
+ 0x26,0xDC,0x5C,0x6C,0xE9,0x4A,0x4B,0x44,0xF3,0x30,
+ 0xB5,0xD9,0xBB,0xD7,0x7C,0xBF,0x95,0x84,0x16,0x29,
+ 0x5C,0xF7,0xE1,0xCE,0x6B,0xCC,0xDC,0x18,0xFF,0x8C,
+ 0x07,0xB6,
+
+ 0x8B,0xD2,0xAE,0xB9,0xCB,0x7E,0x57,0xCB,0x2C,0x4B,
+ 0x48,0x2F,0xFC,0x81,0xB7,0xAF,0xB9,0xDE,0x27,0xE1,
+ 0xE3,0xBD,0x23,0xC2,0x3A,0x44,0x53,0xBD,0x9A,0xCE,
+ 0x32,0x62,
+
+ 0x54,0x7E,0xF8,0x35,0xC3,0xDA,0xC4,0xFD,0x97,0xF8,
+ 0x46,0x1A,0x14,0x61,0x1D,0xC9,0xC2,0x77,0x45,0x13,
+ 0x2D,0xED,0x8E,0x54,0x5C,0x1D,0x54,0xC7,0x2F,0x04,
+ 0x69,0x97,
+
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66,
+ 0x0A,0x90,0x9D,0x83,0x8D,0x71,0x8C,0x39,0x7A,0xA3,
+ 0xB5,0x61,0xA6,0xF7,0x90,0x1E,0x0E,0x82,0x97,0x48,
+ 0x56,0xA7 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+32*6]; }
+ _EC_BRAINPOOL_P256_T1 = {
+ { NID_X9_62_prime_field,0,32,1 }, // cofactor h=1, seed absent
+ { 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66,
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
+ 0x53,0x77,
+
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66,
+ 0x0A,0x90,0x9D,0x83,0x8D,0x72,0x6E,0x3B,0xF6,0x23,
+ 0xD5,0x26,0x20,0x28,0x20,0x13,0x48,0x1D,0x1F,0x6E,
+ 0x53,0x74,
+
+ 0x66,0x2C,0x61,0xC4,0x30,0xD8,0x4E,0xA4,0xFE,0x66,
+ 0xA7,0x73,0x3D,0x0B,0x76,0xB7,0xBF,0x93,0xEB,0xC4,
+ 0xAF,0x2F,0x49,0x25,0x6A,0xE5,0x81,0x01,0xFE,0xE9,
+ 0x2B,0x04,
+
+ 0xA3,0xE8,0xEB,0x3C,0xC1,0xCF,0xE7,0xB7,0x73,0x22,
+ 0x13,0xB2,0x3A,0x65,0x61,0x49,0xAF,0xA1,0x42,0xC4,
+ 0x7A,0xAF,0xBC,0x2B,0x79,0xA1,0x91,0x56,0x2E,0x13,
+ 0x05,0xF4,
+
+ 0x2D,0x99,0x6C,0x82,0x34,0x39,0xC5,0x6D,0x7F,0x7B,
+ 0x22,0xE1,0x46,0x44,0x41,0x7E,0x69,0xBC,0xB6,0xDE,
+ 0x39,0xD0,0x27,0x00,0x1D,0xAB,0xE8,0xF3,0x5B,0x25,
+ 0xC9,0xBE,
+
+ 0xA9,0xFB,0x57,0xDB,0xA1,0xEE,0xA9,0xBC,0x3E,0x66,
+ 0x0A,0x90,0x9D,0x83,0x8D,0x71,0x8C,0x39,0x7A,0xA3,
+ 0xB5,0x61,0xA6,0xF7,0x90,0x1E,0x0E,0x82,0x97,0x48,
+ 0x56,0xA7 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+40*6]; }
+ _EC_BRAINPOOL_P320_R1 = {
+ { NID_X9_62_prime_field,0,40,1 }, // cofactor h=1, seed absent
+ { 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C,
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x27,
+
+ 0x3E,0xE3,0x0B,0x56,0x8F,0xBA,0xB0,0xF8,0x83,0xCC,
+ 0xEB,0xD4,0x6D,0x3F,0x3B,0xB8,0xA2,0xA7,0x35,0x13,
+ 0xF5,0xEB,0x79,0xDA,0x66,0x19,0x0E,0xB0,0x85,0xFF,
+ 0xA9,0xF4,0x92,0xF3,0x75,0xA9,0x7D,0x86,0x0E,0xB4,
+
+ 0x52,0x08,0x83,0x94,0x9D,0xFD,0xBC,0x42,0xD3,0xAD,
+ 0x19,0x86,0x40,0x68,0x8A,0x6F,0xE1,0x3F,0x41,0x34,
+ 0x95,0x54,0xB4,0x9A,0xCC,0x31,0xDC,0xCD,0x88,0x45,
+ 0x39,0x81,0x6F,0x5E,0xB4,0xAC,0x8F,0xB1,0xF1,0xA6,
+
+ 0x43,0xBD,0x7E,0x9A,0xFB,0x53,0xD8,0xB8,0x52,0x89,
+ 0xBC,0xC4,0x8E,0xE5,0xBF,0xE6,0xF2,0x01,0x37,0xD1,
+ 0x0A,0x08,0x7E,0xB6,0xE7,0x87,0x1E,0x2A,0x10,0xA5,
+ 0x99,0xC7,0x10,0xAF,0x8D,0x0D,0x39,0xE2,0x06,0x11,
+
+ 0x14,0xFD,0xD0,0x55,0x45,0xEC,0x1C,0xC8,0xAB,0x40,
+ 0x93,0x24,0x7F,0x77,0x27,0x5E,0x07,0x43,0xFF,0xED,
+ 0x11,0x71,0x82,0xEA,0xA9,0xC7,0x78,0x77,0xAA,0xAC,
+ 0x6A,0xC7,0xD3,0x52,0x45,0xD1,0x69,0x2E,0x8E,0xE1,
+
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C,
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA5,
+ 0xB6,0x8F,0x12,0xA3,0x2D,0x48,0x2E,0xC7,0xEE,0x86,
+ 0x58,0xE9,0x86,0x91,0x55,0x5B,0x44,0xC5,0x93,0x11 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+40*6]; }
+ _EC_BRAINPOOL_P320_T1 = {
+ { NID_X9_62_prime_field,0,40,1 }, // cofactor h=1, seed absent
+ { 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C,
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x27,
+
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C,
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA6,
+ 0xF6,0xF4,0x0D,0xEF,0x4F,0x92,0xB9,0xEC,0x78,0x93,
+ 0xEC,0x28,0xFC,0xD4,0x12,0xB1,0xF1,0xB3,0x2E,0x24,
+
+ 0xA7,0xF5,0x61,0xE0,0x38,0xEB,0x1E,0xD5,0x60,0xB3,
+ 0xD1,0x47,0xDB,0x78,0x20,0x13,0x06,0x4C,0x19,0xF2,
+ 0x7E,0xD2,0x7C,0x67,0x80,0xAA,0xF7,0x7F,0xB8,0xA5,
+ 0x47,0xCE,0xB5,0xB4,0xFE,0xF4,0x22,0x34,0x03,0x53,
+
+ 0x92,0x5B,0xE9,0xFB,0x01,0xAF,0xC6,0xFB,0x4D,0x3E,
+ 0x7D,0x49,0x90,0x01,0x0F,0x81,0x34,0x08,0xAB,0x10,
+ 0x6C,0x4F,0x09,0xCB,0x7E,0xE0,0x78,0x68,0xCC,0x13,
+ 0x6F,0xFF,0x33,0x57,0xF6,0x24,0xA2,0x1B,0xED,0x52,
+
+ 0x63,0xBA,0x3A,0x7A,0x27,0x48,0x3E,0xBF,0x66,0x71,
+ 0xDB,0xEF,0x7A,0xBB,0x30,0xEB,0xEE,0x08,0x4E,0x58,
+ 0xA0,0xB0,0x77,0xAD,0x42,0xA5,0xA0,0x98,0x9D,0x1E,
+ 0xE7,0x1B,0x1B,0x9B,0xC0,0x45,0x5F,0xB0,0xD2,0xC3,
+
+ 0xD3,0x5E,0x47,0x20,0x36,0xBC,0x4F,0xB7,0xE1,0x3C,
+ 0x78,0x5E,0xD2,0x01,0xE0,0x65,0xF9,0x8F,0xCF,0xA5,
+ 0xB6,0x8F,0x12,0xA3,0x2D,0x48,0x2E,0xC7,0xEE,0x86,
+ 0x58,0xE9,0x86,0x91,0x55,0x5B,0x44,0xC5,0x93,0x11 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+48*6]; }
+ _EC_BRAINPOOL_P384_R1 = {
+ { NID_X9_62_prime_field,0,48,1 }, // cofactor h=1, seed absent
+ { 0x8C,0xB9,0x1E,0x82,0x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0xD5,0x52,0x62,0xB7,0x0B,0x29,
+ 0xFE,0xEC,0x58,0x64,0xE1,0x9C,0x05,0x4F,0xF9,0x91,
+ 0x29,0x28,0x0E,0x46,0x46,0x21,0x77,0x91,0x81,0x11,
+ 0x42,0x82,0x03,0x41,0x26,0x3C,0x53,0x15,
+
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D,
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
+ 0xED,0x54,0x56,0xB3,0x1F,0x16,0x6E,0x6C,0xAC,0x04,
+ 0x25,0xA7,0xCF,0x3A,0xB6,0xAF,0x6B,0x7F,0xC3,0x10,
+ 0x3B,0x88,0x32,0x02,0xE9,0x04,0x65,0x65 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+48*6]; }
+ _EC_BRAINPOOL_P384_T1 = {
+ { NID_X9_62_prime_field,0,48,1 }, // cofactor h=1, seed absent
+ { 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D,
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
+ 0xED,0x54,0x56,0xB4,0x12,0xB1,0xDA,0x19,0x7F,0xB7,
+ 0x11,0x23,0xAC,0xD3,0xA7,0x29,0x90,0x1D,0x1A,0x71,
+ 0x87,0x47,0x00,0x13,0x31,0x07,0xEC,0x53,
+
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D,
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
+ 0xED,0x54,0x56,0xB4,0x12,0xB1,0xDA,0x19,0x7F,0xB7,
+ 0x11,0x23,0xAC,0xD3,0xA7,0x29,0x90,0x1D,0x1A,0x71,
+ 0x87,0x47,0x00,0x13,0x31,0x07,0xEC,0x50,
+
+ 0x7F,0x51,0x9E,0xAD,0xA7,0xBD,0xA8,0x1B,0xD8,0x26,
+ 0xDB,0xA6,0x47,0x91,0x0F,0x8C,0x4B,0x93,0x46,0xED,
+ 0x8C,0xCD,0xC6,0x4E,0x4B,0x1A,0xBD,0x11,0x75,0x6D,
+ 0xCE,0x1D,0x20,0x74,0xAA,0x26,0x3B,0x88,0x80,0x5C,
+ 0xED,0x70,0x35,0x5A,0x33,0xB4,0x71,0xEE,
+
+ 0x18,0xDE,0x98,0xB0,0x2D,0xB9,0xA3,0x06,0xF2,0xAF,
+ 0xCD,0x72,0x35,0xF7,0x2A,0x81,0x9B,0x80,0xAB,0x12,
+ 0xEB,0xD6,0x53,0x17,0x24,0x76,0xFE,0xCD,0x46,0x2A,
+ 0xAB,0xFF,0xC4,0xFF,0x19,0x1B,0x94,0x6A,0x5F,0x54,
+ 0xD8,0xD0,0xAA,0x2F,0x41,0x88,0x08,0xCC,
+
+ 0x25,0xAB,0x05,0x69,0x62,0xD3,0x06,0x51,0xA1,0x14,
+ 0xAF,0xD2,0x75,0x5A,0xD3,0x36,0x74,0x7F,0x93,0x47,
+ 0x5B,0x7A,0x1F,0xCA,0x3B,0x88,0xF2,0xB6,0xA2,0x08,
+ 0xCC,0xFE,0x46,0x94,0x08,0x58,0x4D,0xC2,0xB2,0x91,
+ 0x26,0x75,0xBF,0x5B,0x9E,0x58,0x29,0x28,
+
+ 0x8C,0xB9,0x1E,0x82,0xA3,0x38,0x6D,0x28,0x0F,0x5D,
+ 0x6F,0x7E,0x50,0xE6,0x41,0xDF,0x15,0x2F,0x71,0x09,
+ 0xED,0x54,0x56,0xB3,0x1F,0x16,0x6E,0x6C,0xAC,0x04,
+ 0x25,0xA7,0xCF,0x3A,0xB6,0xAF,0x6B,0x7F,0xC3,0x10,
+ 0x3B,0x88,0x32,0x02,0xE9,0x04,0x65,0x65 }
+ };
+
+static const struct { EC_CURVE_DATA h; unsigned char data[0+64*6]; }
+ _EC_BRAINPOOL_P512_R1 = {
+ { NID_X9_62_prime_field,0,64,1 }, // cofactor h=1, seed absent
+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sec3, &_EC_IPSEC_155_ID3.h, "\n\tIPSec/IKE/Oakley curve #3 over a 155 bit binary field.\n""\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
{ NID_ipsec4, &_EC_IPSEC_185_ID4.h, "\n\tIPSec/IKE/Oakley curve #4 over a 185 bit binary field.\n""\tNot suitable for ECDSA.\n\tQuestionable extension field!"},
+ /* Brainpool curves according to RFC 5639 */
+ { NID_brainpoolP160r1, &_EC_BRAINPOOL_P160_R1.h, "Brainpool curve over a 160 bit prime field" },
+ { NID_brainpoolP160t1, &_EC_BRAINPOOL_P160_T1.h, "Brainpool (twisted) curve over a 160 bit prime field" },
+ { NID_brainpoolP192r1, &_EC_BRAINPOOL_P192_R1.h, "Brainpool curve over a 192 bit prime field" },
+ { NID_brainpoolP192t1, &_EC_BRAINPOOL_P192_T1.h, "Brainpool (twisted) curve over a 192 bit prime field" },
+ { NID_brainpoolP224r1, &_EC_BRAINPOOL_P224_R1.h, "Brainpool curve over a 224 bit prime field" },
+ { NID_brainpoolP224t1, &_EC_BRAINPOOL_P224_T1.h, "Brainpool (twisted) curve over a 224 bit prime field" },
+ { NID_brainpoolP256r1, &_EC_BRAINPOOL_P256_R1.h, "Brainpool curve over a 256 bit prime field" },
+ { NID_brainpoolP256t1, &_EC_BRAINPOOL_P256_T1.h, "Brainpool (twisted) curve over a 256 bit prime field" },
+ { NID_brainpoolP320r1, &_EC_BRAINPOOL_P320_R1.h, "Brainpool curve over a 320 bit prime field" },
+ { NID_brainpoolP320t1, &_EC_BRAINPOOL_P320_T1.h, "Brainpool (twisted) curve over a 320 bit prime field" },
+ { NID_brainpoolP384r1, &_EC_BRAINPOOL_P384_R1.h, "Brainpool curve over a 384 bit prime field" },
+ { NID_brainpoolP384t1, &_EC_BRAINPOOL_P384_T1.h, "Brainpool (twisted) curve over a 384 bit prime field" },
+ { NID_brainpoolP512r1, &_EC_BRAINPOOL_P512_R1.h, "Brainpool curve over a 512 bit prime field" },
+ { NID_brainpoolP512t1, &_EC_BRAINPOOL_P512_T1.h, "Brainpool (twisted) curve over a 512 bit prime field" },
};
#define curve_list_length (sizeof(curve_list)/sizeof(ec_list_element))
diff -ur openssl-1.0.0a-orig/crypto/objects/objects.txt openssl-1.0.0a/crypto/objects/objects.txt
--- openssl-1.0.0a-orig/crypto/objects/objects.txt 2010-01-25 17:07:51.000000000 +0100
+++ openssl-1.0.0a/crypto/objects/objects.txt 2010-10-09 09:50:12.000000000 +0200
@@ -1257,3 +1257,27 @@
# There is no OID that just denotes "HMAC" oddly enough...
: HMAC : hmac
+
+# Brainpool Elliptic Curves
+iso identified-organization 36 : teletrust
+teletrust 3 : teletrust-algo : teletrust-algorithm
+teletrust-algorithm 3 : teletrust-sig-algo : teletrust-signature-algorithm
+teletrust-signature-algorithm 2 : teletrust-sig-algo-ecSign : teletrust-signature-algorithm-ecSign
+teletrust-signature-algorithm-ecSign 8 : ecStdCurvesAndGeneration
+ecStdCurvesAndGeneration 1 : BPellipticCurve
+BPellipticCurve 1 : BPversionOne
+BPversionOne 1 : brainpoolP160r1
+BPversionOne 2 : brainpoolP160t1
+BPversionOne 3 : brainpoolP192r1
+BPversionOne 4 : brainpoolP192t1
+BPversionOne 5 : brainpoolP224r1
+BPversionOne 6 : brainpoolP224t1
+BPversionOne 7 : brainpoolP256r1
+BPversionOne 8 : brainpoolP256t1
+BPversionOne 9 : brainpoolP320r1
+BPversionOne 10 : brainpoolP320t1
+BPversionOne 11 : brainpoolP384r1
+BPversionOne 12 : brainpoolP384t1
+BPversionOne 13 : brainpoolP512r1
+BPversionOne 14 : brainpoolP512t1
+