numam-dpdk/app/test/test_cryptodev_des_test_vectors.h
Arek Kusztal 16e7dce6e1 app/test: check DES on QAT
This commit adds tests of Data Encryption Standard (DES)
algorithm to Intel QuickAssist technology crypto test suites

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
2017-01-18 21:46:08 +01:00

1066 lines
35 KiB
C

/*
* BSD LICENSE
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef TEST_CRYPTODEV_DES_TEST_VECTORS_H_
#define TEST_CRYPTODEV_DES_TEST_VECTORS_H_
static const uint8_t plaintext_des[] = {
"What a lousy earth! He wondered how many people "
"were destitute that same night even in his own "
"prosperous country, how many homes were "
"shanties, how many husbands were drunk and "
"wives socked, and how many children were "
"bullied, abused, or abandoned. How many "
"families hungered for food they could not "
"afford to buy? How many hearts were broken? How "
"many suicides would take place that same night, "
"how many people would go insane? How many "
"cockroaches and landlords would triumph? How "
"many winners were losers, successes failures, "
"and rich men poor men? How many wise guys were "
"stupid? How many happy endings were unhappy "
"endings? How many honest men were liars, brave "
"men cowards, loyal men traitors, how many "
"sainted men were corrupt, how many people in "
"positions of trust had sold their souls to "
"bodyguards, how many had never had souls? How "
"many straight-and-narrow paths were crooked "
"paths? How many best families were worst "
"families and how many good people were bad "
"people? When you added them all up and then "
"subtracted, you might be left with only the "
"children, and perhaps with Albert Einstein and "
"an old violinist or sculptor somewhere."
};
static const uint8_t ciphertext512_des128ctr[] = {
0x13, 0x39, 0x3B, 0xBC, 0x1D, 0xE3, 0x23, 0x09,
0x9B, 0x08, 0xD1, 0x09, 0x52, 0x93, 0x78, 0x29,
0x11, 0x21, 0xBA, 0x01, 0x15, 0xCD, 0xEC, 0xAA,
0x79, 0x77, 0x58, 0xAE, 0xAE, 0xBC, 0x97, 0x33,
0x94, 0xA9, 0x2D, 0xC0, 0x0A, 0xA9, 0xA4, 0x4B,
0x19, 0x07, 0x88, 0x06, 0x7E, 0x81, 0x0F, 0xB5,
0x60, 0xCF, 0xA7, 0xC3, 0x2A, 0x43, 0xFF, 0x16,
0x3A, 0x5F, 0x11, 0x2D, 0x11, 0x38, 0x37, 0x94,
0x2A, 0xC8, 0x3D, 0x20, 0xBB, 0x93, 0x95, 0x54,
0x12, 0xFF, 0x0C, 0x47, 0x89, 0x7D, 0x73, 0xD1,
0x2E, 0x3A, 0x80, 0x52, 0xA8, 0x92, 0x93, 0x99,
0x16, 0xB8, 0x12, 0x1B, 0x8B, 0xA8, 0xC1, 0x81,
0x95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 0xA7, 0xC4, 0x7D,
0x27, 0xE2, 0x14, 0x11, 0x53, 0x19, 0xE7, 0xCA,
0x94, 0x4E, 0x0D, 0x2C, 0xF7, 0x36, 0x47, 0xDB,
0x77, 0x3C, 0x22, 0xAC, 0xBE, 0xE1, 0x06, 0x55,
0xE5, 0xDD, 0x8B, 0x65, 0xE8, 0xE9, 0x91, 0x52,
0x59, 0x97, 0xFC, 0x8C, 0xEE, 0x96, 0x22, 0x60,
0xEE, 0xBF, 0x82, 0xF0, 0xCA, 0x14, 0xF9, 0xD3
};
static const struct blockcipher_test_data
triple_des128ctr_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128ctr,
.len = 512
}
};
static const struct blockcipher_test_data
triple_des128ctr_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128ctr,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1,
.digest = {
.data = {
0xC3, 0x40, 0xD5, 0xD9, 0x8F, 0x8A, 0xC0, 0xF0,
0x46, 0x28, 0x02, 0x01, 0xB5, 0xC1, 0x87, 0x4D,
0xAC, 0xFE, 0x48, 0x76
},
.len = 20
}
};
static const struct blockcipher_test_data
triple_des128ctr_hmac_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128ctr,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.auth_key = {
.data = {
0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
0xDE, 0xF4, 0xDE, 0xAD
},
.len = 20
},
.digest = {
.data = {
0xF1, 0xC1, 0xDB, 0x4D, 0xFA, 0x7F, 0x2F, 0xE5,
0xF8, 0x49, 0xEA, 0x1D, 0x7F, 0xCB, 0x42, 0x59,
0xC4, 0x1E, 0xB1, 0x18
},
.len = 20
}
};
static const uint8_t ciphertext512_des192ctr[] = {
0xFF, 0x32, 0x52, 0x97, 0x10, 0xBF, 0x0B, 0x10,
0x68, 0x0F, 0x4F, 0x56, 0x8B, 0x2C, 0x7B, 0x8E,
0x39, 0x1E, 0x1A, 0x2F, 0x83, 0xDE, 0x5E, 0x35,
0xC8, 0x4B, 0xDF, 0xD5, 0xBC, 0x84, 0x50, 0x1A,
0x02, 0xDF, 0xB3, 0x11, 0xE4, 0xDA, 0xB8, 0x0E,
0x47, 0xC6, 0x0C, 0x51, 0x09, 0x62, 0x9C, 0x5D,
0x71, 0x40, 0x49, 0xD8, 0x55, 0xBD, 0x7D, 0x90,
0x71, 0xC5, 0xF7, 0x07, 0x6F, 0x08, 0x71, 0x2A,
0xB1, 0x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x36, 0x1D, 0x4B, 0xBF, 0x4E, 0xA4, 0x35,
0xCC, 0xFE, 0xF5, 0x7A, 0x73, 0xB4, 0x6D, 0x20,
0x1D, 0xC0, 0xE5, 0x21, 0x5C, 0xD2, 0x8A, 0x65,
0x08, 0xB6, 0x63, 0xAC, 0x9A, 0x1E, 0x3F, 0x3C,
0xAB, 0xB6, 0x6D, 0x34, 0xB2, 0x3A, 0x08, 0xDA,
0x29, 0x63, 0xD1, 0xA4, 0x83, 0x52, 0xB0, 0x63,
0x1B, 0x89, 0x35, 0x57, 0x59, 0x2C, 0x0F, 0x72,
0x72, 0xFD, 0xA0, 0xAC, 0xDB, 0xB4, 0xA3, 0xA1,
0x18, 0x10, 0x12, 0x97, 0x99, 0x63, 0x38, 0x98,
0x96, 0xB5, 0x16, 0x07, 0x4E, 0xE9, 0x2C, 0x97
};
static const struct blockcipher_test_data
triple_des192ctr_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192ctr,
.len = 512
}
};
static const struct blockcipher_test_data
triple_des192ctr_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192ctr,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1,
.digest = {
.data = {
0xEA, 0x62, 0xB9, 0xB2, 0x78, 0x6C, 0x8E, 0xDB,
0xA3, 0xB6, 0xFF, 0x23, 0x3A, 0x47, 0xD8, 0xC8,
0xED, 0x5E, 0x20, 0x1D
},
.len = 20
}
};
static const struct blockcipher_test_data
triple_des192ctr_hmac_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CTR,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192ctr,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.auth_key = {
.data = {
0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
0xDE, 0xF4, 0xDE, 0xAD
},
.len = 20
},
.digest = {
.data = {
0x32, 0xD5, 0x19, 0x8F, 0x79, 0x3A, 0xAA, 0x7B,
0x70, 0x67, 0x4E, 0x63, 0x88, 0xA3, 0x9A, 0x82,
0x07, 0x33, 0x12, 0x94
},
.len = 20
}
};
static const uint8_t ciphertext512_des128cbc[] = {
0x28, 0x2a, 0xff, 0x15, 0x5c, 0xdf, 0xd9, 0x6b,
0x54, 0xbc, 0x7b, 0xfb, 0xc5, 0x64, 0x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, 0x71,
0x0e, 0xe4, 0x98, 0x7e, 0x59, 0x5a, 0xc9, 0x78,
0x9c, 0xfb, 0x6c, 0x81, 0x44, 0xb4, 0x0f, 0x5e,
0x18, 0x53, 0xb8, 0x6f, 0xbc, 0x3b, 0x15, 0xf0,
0x10, 0xdd, 0x0d, 0x4b, 0x0a, 0x36, 0x0e, 0xb4,
0x76, 0x0f, 0x16, 0xa7, 0x5c, 0x9d, 0xcf, 0xb0,
0x6d, 0x38, 0x02, 0x07, 0x05, 0xe9, 0xe9, 0x46,
0x08, 0xb8, 0x52, 0xd6, 0xd9, 0x4c, 0x81, 0x63,
0x1d, 0xe2, 0x5b, 0xd0, 0xf6, 0x5e, 0x1e, 0x81,
0x48, 0x08, 0x66, 0x3a, 0x85, 0xed, 0x65, 0xfe,
0xe8, 0x05, 0x7a, 0xe1, 0xe6, 0x12, 0xf2, 0x52,
0x83, 0xdd, 0x82, 0xbe, 0xf6, 0x34, 0x8a, 0x6f,
0xc5, 0x83, 0xcd, 0x3f, 0xbe, 0x58, 0x8b, 0x11,
0x78, 0xdc, 0x0c, 0x83, 0x72, 0x5d, 0x05, 0x2a,
0x01, 0x29, 0xee, 0x48, 0x9a, 0x67, 0x00, 0x6e,
0x14, 0x60, 0x2d, 0x00, 0x52, 0x87, 0x98, 0x5e,
0x43, 0xfe, 0xf1, 0x10, 0x14, 0xf1, 0x91, 0xcc
};
static const uint8_t ciphertext512_des[] = {
0x1A, 0x46, 0xDB, 0x69, 0x43, 0x45, 0x0F, 0x2F,
0xDC, 0x27, 0xF9, 0x41, 0x0E, 0x01, 0x58, 0xB4,
0x5E, 0xCC, 0x13, 0xF5, 0x92, 0x99, 0xE4, 0xF2,
0xD5, 0xF9, 0x16, 0xFE, 0x0F, 0x7E, 0xDE, 0xA0,
0xF5, 0x32, 0xFE, 0x20, 0x67, 0x93, 0xCA, 0xE1,
0x8E, 0x4D, 0x72, 0xA3, 0x50, 0x72, 0x14, 0x15,
0x70, 0xE7, 0xAB, 0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, 0xE1, 0x7F,
0x0D, 0x89, 0x10, 0xEF, 0x78, 0xB0, 0xDB, 0xD0,
0x72, 0x44, 0x60, 0x1D, 0xCF, 0x7C, 0x25, 0x1A,
0xBB, 0xC3, 0x92, 0x53, 0x8E, 0x9F, 0x27, 0xC7,
0xE8, 0x08, 0xFC, 0x5D, 0x50, 0x3E, 0xFC, 0xB0,
0x00, 0xE2, 0x48, 0xB2, 0x4B, 0xF8, 0xF2, 0xE3,
0xD3, 0x8B, 0x71, 0x64, 0xB8, 0xF0, 0x6E, 0x4A,
0x23, 0xA0, 0xA4, 0x88, 0xA4, 0x36, 0x45, 0x6B,
0x5A, 0xE7, 0x57, 0x65, 0xEA, 0xC9, 0xF8, 0xE8,
0x7A, 0x80, 0x22, 0x67, 0x1A, 0x05, 0xF2, 0x78,
0x81, 0x17, 0xCD, 0x87, 0xFB, 0x0D, 0x25, 0x84,
0x49, 0x06, 0x25, 0xCE, 0xFC, 0x38, 0x06, 0x18,
0x2E, 0x1D, 0xE1, 0x33, 0x97, 0xB6, 0x7E, 0xAB,
};
static const struct blockcipher_test_data
triple_des128cbc_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128cbc,
.len = 512
}
};
static const struct blockcipher_test_data
triple_des128cbc_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128cbc,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1,
.digest = {
.data = {
0x94, 0x45, 0x7B, 0xDF, 0xFE, 0x80, 0xB9, 0xA6,
0xA0, 0x7A, 0xE8, 0x93, 0x40, 0x7B, 0x85, 0x02,
0x1C, 0xD7, 0xE8, 0x87
},
.len = 20
}
};
static const struct blockcipher_test_data
triple_des128cbc_hmac_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A
},
.len = 16
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des128cbc,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.auth_key = {
.data = {
0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
0xDE, 0xF4, 0xDE, 0xAD
},
.len = 20
},
.digest = {
.data = {
0x7E, 0xBA, 0xFF, 0x86, 0x8D, 0x65, 0xCD, 0x08,
0x76, 0x34, 0x94, 0xE9, 0x9A, 0xCD, 0xB2, 0xBB,
0xBF, 0x65, 0xF5, 0x42
},
.len = 20
}
};
static const uint8_t ciphertext512_des192cbc[] = {
0xd0, 0xc9, 0xdc, 0x51, 0x29, 0x97, 0x03, 0x64,
0xcd, 0x22, 0xba, 0x3d, 0x2b, 0xbc, 0x21, 0x37,
0x7b, 0x1e, 0x29,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19, 0xfc,
0xcc, 0xb9, 0xb1, 0xbe, 0x48, 0x9f, 0x2d, 0x3f,
0x39, 0x2e, 0xdd, 0x71, 0xde, 0x1b, 0x54, 0xee,
0x7d, 0x94, 0x8f, 0x27, 0x23, 0xe9, 0x74, 0x92,
0x14, 0x93, 0x84, 0x65, 0xc9, 0x22, 0x7c, 0xa8,
0x1b, 0x72, 0x73, 0xb1, 0x23, 0xa0, 0x6b, 0xcc,
0xb5, 0x22, 0x06, 0x15, 0xe5, 0x96, 0x03, 0x4a,
0x52, 0x8d, 0x1d, 0xbf, 0x3e, 0x82, 0x45, 0x9c,
0x75, 0x9e, 0xa9, 0x3a, 0x97, 0xb6, 0x5d, 0xc4,
0x75, 0x67, 0xa1, 0xf3, 0x0f, 0x7a, 0xfd, 0x71,
0x58, 0x04, 0xf9, 0xa7, 0xc2, 0x56, 0x74, 0x04,
0x74, 0x68, 0x6d, 0x8a, 0xf6, 0x6c, 0x5d, 0xd8,
0xb5, 0xed, 0x70, 0x23, 0x32, 0x4d, 0x75, 0x92,
0x88, 0x7b, 0x39, 0x37, 0x02, 0x4b, 0xb2, 0x1c,
0x1f, 0x7e, 0x5b, 0x1b, 0x10, 0xfc, 0x17, 0x21,
0x66, 0x62, 0x63, 0xc2, 0xcd, 0x16, 0x96, 0x3e
};
static const struct blockcipher_test_data
triple_des192cbc_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192cbc,
.len = 512
}
};
static const struct blockcipher_test_data
triple_des192cbc_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192cbc,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1,
.digest = {
.data = {
0x53, 0x27, 0xC0, 0xE6, 0xD6, 0x1B, 0xD6, 0x45,
0x94, 0x2D, 0xCE, 0x8B, 0x29, 0xA3, 0x52, 0x14,
0xC1, 0x6B, 0x87, 0x99
},
.len = 20
}
};
static const struct blockcipher_test_data
triple_des192cbc_hmac_sha1_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_3DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2,
0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
0xD4, 0xC3, 0xA3, 0xAA, 0x33, 0x62, 0x61, 0xE0
},
.len = 24
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des192cbc,
.len = 512
},
.auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC,
.auth_key = {
.data = {
0xF8, 0x2A, 0xC7, 0x54, 0xDB, 0x96, 0x18, 0xAA,
0xC3, 0xA1, 0x53, 0xF6, 0x1F, 0x17, 0x60, 0xBD,
0xDE, 0xF4, 0xDE, 0xAD
},
.len = 20
},
.digest = {
.data = {
0xBA, 0xAC, 0x74, 0x19, 0x43, 0xB0, 0x72, 0xB8,
0x08, 0xF5, 0x24, 0xC4, 0x09, 0xBD, 0x48, 0xC1,
0x3C, 0x50, 0x1C, 0xDD
},
.len = 20
}
};
static const struct blockcipher_test_data
des_cbc_test_vector = {
.crypto_algo = RTE_CRYPTO_CIPHER_DES_CBC,
.cipher_key = {
.data = {
0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2
},
.len = 8
},
.iv = {
.data = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
},
.len = 8
},
.plaintext = {
.data = plaintext_des,
.len = 512
},
.ciphertext = {
.data = ciphertext512_des,
.len = 512
},
};
static const struct blockcipher_test_case des_cipheronly_test_cases[] = {
{
.test_descr = "DES-CBC Encryption",
.test_data = &des_cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "DES-CBC Decryption",
.test_data = &des_cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
};
static const struct blockcipher_test_case triple_des_chain_test_cases[] = {
{
.test_descr = "3DES-128-CBC HMAC-SHA1 Encryption Digest",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CBC HMAC-SHA1 Decryption Digest Verify",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CBC SHA1 Encryption Digest",
.test_data = &triple_des128cbc_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-128-CBC SHA1 Decryption Digest Verify",
.test_data = &triple_des128cbc_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-192-CBC HMAC-SHA1 Encryption Digest",
.test_data = &triple_des192cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CBC HMAC-SHA1 Decryption Digest Verify",
.test_data = &triple_des192cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CBC SHA1 Encryption Digest",
.test_data = &triple_des192cbc_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-192-CBC SHA1 Decryption Digest Verify",
.test_data = &triple_des192cbc_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-128-CTR HMAC-SHA1 Encryption Digest",
.test_data = &triple_des128ctr_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CTR HMAC-SHA1 Decryption Digest Verify",
.test_data = &triple_des128ctr_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CTR SHA1 Encryption Digest",
.test_data = &triple_des128ctr_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-128-CTR SHA1 Decryption Digest Verify",
.test_data = &triple_des128ctr_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-192-CTR HMAC-SHA1 Encryption Digest",
.test_data = &triple_des192ctr_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CTR HMAC-SHA1 Decryption Digest Verify",
.test_data = &triple_des192ctr_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CTR SHA1 Encryption Digest",
.test_data = &triple_des192ctr_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-192-CTR SHA1 Decryption Digest Verify",
.test_data = &triple_des192ctr_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr = "3DES-128-CBC HMAC-SHA1 Encryption Digest OOP",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CBC HMAC-SHA1 Decryption Digest"
" Verify OOP",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CBC HMAC-SHA1 Encryption Digest"
" Sessionless",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENC_AUTH_GEN,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
{
.test_descr =
"3DES-128-CBC HMAC-SHA1 Decryption Digest"
" Verify Sessionless",
.test_data = &triple_des128cbc_hmac_sha1_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY_DEC,
.feature_mask = BLOCKCIPHER_TEST_FEATURE_SESSIONLESS,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL
},
};
static const struct blockcipher_test_case triple_des_cipheronly_test_cases[] = {
{
.test_descr = "3DES-128-CBC Encryption",
.test_data = &triple_des128cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CBC Decryption",
.test_data = &triple_des128cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CBC Encryption",
.test_data = &triple_des192cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CBC Decryption",
.test_data = &triple_des192cbc_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CTR Encryption",
.test_data = &triple_des128ctr_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-128-CTR Decryption",
.test_data = &triple_des128ctr_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CTR Encryption",
.test_data = &triple_des192ctr_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_ENCRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
},
{
.test_descr = "3DES-192-CTR Decryption",
.test_data = &triple_des192ctr_test_vector,
.op_mask = BLOCKCIPHER_TEST_OP_DECRYPT,
.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
BLOCKCIPHER_TEST_TARGET_PMD_QAT
}
};
#endif /* TEST_CRYPTODEV_DES_TEST_VECTORS_H_ */