-/*-
- * 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.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2016-2017 Intel Corporation
*/
#ifndef TEST_CRYPTODEV_ZUC_TEST_VECTORS_H_
struct {
uint8_t data[64] __rte_aligned(16);
unsigned len;
- } iv;
+ } cipher_iv;
struct {
uint8_t data[2048];
unsigned len;
} validCipherLenInBits;
- struct {
- unsigned len;
- } validCipherOffsetLenInBits;
-
struct {
unsigned len;
} validAuthLenInBits;
- struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
struct {
uint8_t data[64];
unsigned len;
- } aad;
+ } auth_iv;
struct {
uint8_t data[64];
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
},
.validCipherLenInBits = {
.len = 193
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
},
.validCipherLenInBits = {
.len = 800
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00,
0x76, 0x45, 0x2E, 0xC1, 0x14, 0x00, 0x00, 0x00
},
.validCipherLenInBits = {
.len = 1570
- },
- .validCipherOffsetLenInBits = {
- .len = 128
- },
+ }
};
static struct wireless_test_data zuc_test_case_cipher_2798b = {
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00,
0xE4, 0x85, 0x0F, 0xE1, 0x84, 0x00, 0x00, 0x00
},
.validCipherLenInBits = {
.len = 2798
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00,
0x27, 0x38, 0xCD, 0xAA, 0xD0, 0x00, 0x00, 0x00
},
.validCipherLenInBits = {
.len = 4019
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00,
0x66, 0x03, 0x54, 0x92, 0x78, 0x00, 0x00, 0x00
.validCipherLenInBits = {
.len = 200
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
- .aad = {
+ .auth_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
},
.validAuthLenInBits = {
.len = 200
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .iv = {
+ .cipher_iv = {
.data = {
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
.validCipherLenInBits = {
.len = 800
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
- .aad = {
+ .auth_iv = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00
},
.validAuthLenInBits = {
.len = 120
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.validAuthLenInBits = {
.len = 1
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xC8, 0xA9, 0x59, 0x5E},
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x56, 0x1E, 0xB2, 0xDD, 0xA0, 0x00, 0x00, 0x00,
0x56, 0x1E, 0xB2, 0xDD, 0xA0, 0x00, 0x00, 0x00
.validAuthLenInBits = {
.len = 90
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x67, 0x19, 0xA0, 0x88},
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0xA9, 0x40, 0x59, 0xDA, 0x50, 0x00, 0x00, 0x00,
0x29, 0x40, 0x59, 0xDA, 0x50, 0x00, 0x80, 0x00
.validAuthLenInBits = {
.len = 577
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xFA, 0xE8, 0xFF, 0x0B},
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
.validAuthLenInBits = {
.len = 2079
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x00, 0x4A, 0xC4, 0xD6},
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x56, 0x1E, 0xB2, 0xDD, 0xE0, 0x00, 0x00, 0x00,
0x56, 0x1E, 0xB2, 0xDD, 0xE0, 0x00, 0x00, 0x00
.validAuthLenInBits = {
.len = 5670
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x0C, 0xA1, 0x27, 0x92},
.len = 4
.data = { 0x0 },
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = { 0x0 },
.len = 16
},
.validAuthLenInBits = {
.len = 8
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = { 0x39, 0x0a, 0x91, 0xb7 },
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0x05, 0x09, 0x78, 0x50, 0x80, 0x00, 0x00, 0x00,
0x85, 0x09, 0x78, 0x50, 0x80, 0x00, 0x80, 0x00
.validAuthLenInBits = {
.len = 2080
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x03, 0x95, 0x32, 0xe1},
.len = 4
},
.len = 16
},
- .aad = {
+ .auth_iv = {
.data = {
0xa9, 0x40, 0x59, 0xda, 0x50, 0x0, 0x0, 0x0,
0x29, 0x40, 0x59, 0xda, 0x50, 0x0, 0x80, 0x0
.validAuthLenInBits = {
.len = 584
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x24, 0xa8, 0x42, 0xb3},
.len = 4