3607 lines
149 KiB
C
3607 lines
149 KiB
C
/* $NetBSD: t_cgd_aes.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */
|
|
/*-
|
|
* Copyright (c) 2016 The NetBSD Foundation, Inc.
|
|
* Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc
|
|
* All rights reserved.
|
|
*
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
* by Alexander Nasonov.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
*
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. 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.
|
|
*
|
|
* 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 HOLDERS 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.
|
|
*/
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/sysctl.h>
|
|
|
|
#include <atf-c.h>
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <util.h>
|
|
|
|
#include <dev/cgdvar.h>
|
|
|
|
#include <rump/rump.h>
|
|
#include <rump/rump_syscalls.h>
|
|
|
|
#include "h_macros.h"
|
|
|
|
#define SECSIZE 512
|
|
|
|
struct testvec {
|
|
unsigned int blkno;
|
|
const uint8_t *ptxt; /* PlainText */
|
|
const uint8_t *ctxt; /* CipherText */
|
|
};
|
|
|
|
/*
|
|
* 128 bits CBC key, NUL terminated.
|
|
*/
|
|
static const char aes_cbc_128_key[17] = {
|
|
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
|
|
0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
|
|
0
|
|
};
|
|
|
|
/*
|
|
* 192 bits CBC key, NUL terminated.
|
|
*/
|
|
static const char aes_cbc_192_key[25] = {
|
|
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, /* ABCDEFGH */
|
|
0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, /* IJKLMNOP */
|
|
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* QRSTUVWX */
|
|
0
|
|
};
|
|
|
|
/*
|
|
* 256 bits CBC key, NUL terminated.
|
|
*/
|
|
static const char aes_cbc_256_key[33] = {
|
|
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
|
|
0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */
|
|
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */
|
|
0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, /* 89abcdef */
|
|
0
|
|
};
|
|
|
|
static const uint8_t aes_cbc_ptxt[SECSIZE] =
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop"
|
|
" abcdefghijklmnop";
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 0.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno1_vec0_ctxt[SECSIZE] = {
|
|
0x1e, 0x95, 0x12, 0x15, 0xf6, 0xe0, 0xa7, 0x56,
|
|
0x95, 0xa0, 0xa7, 0x35, 0x77, 0xf4, 0xdd, 0xdc,
|
|
0x37, 0xc0, 0x28, 0x20, 0x00, 0x79, 0xa0, 0x35,
|
|
0xe0, 0x83, 0x23, 0x95, 0x4e, 0xea, 0x8d, 0xa2,
|
|
0x11, 0xbf, 0x9a, 0xd5, 0x21, 0x1e, 0x15, 0xb9,
|
|
0xd1, 0x2e, 0xd2, 0xd9, 0xa5, 0xcc, 0x26, 0x75,
|
|
0xba, 0x3e, 0x30, 0x11, 0xb2, 0x40, 0xdd, 0x1d,
|
|
0x07, 0x3b, 0xe6, 0x00, 0xa7, 0x31, 0x9e, 0x58,
|
|
0x41, 0xf3, 0x02, 0xf5, 0xad, 0x35, 0x79, 0x9a,
|
|
0x9e, 0x03, 0xc8, 0x7a, 0x9d, 0x1d, 0x58, 0x9f,
|
|
0x98, 0x67, 0xe2, 0x49, 0x81, 0x0c, 0x23, 0x90,
|
|
0xd8, 0xc6, 0xf0, 0xc5, 0x73, 0x46, 0xd5, 0x14,
|
|
0x1d, 0x78, 0x24,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f2, 0x5e, 0x02, 0x4b, 0x61, 0x6d, 0xef, 0x78,
|
|
0x29, 0xe4, 0x3a, 0x56, 0x14, 0x20, 0x6f, 0x70,
|
|
0x82, 0xea, 0x5d, 0xbc, 0x48, 0x89, 0x34, 0x69,
|
|
0xdb, 0x4a, 0x06, 0xa7, 0xd6, 0xc7, 0xb7, 0x06,
|
|
0x8e, 0x64, 0x21, 0x3e, 0xa6, 0x32, 0x61, 0x59,
|
|
0x03, 0xea, 0xc3, 0x71, 0xf0, 0x26, 0x02, 0xe0,
|
|
0x71, 0x95, 0x38, 0x11, 0x32, 0xe6, 0x3b, 0x25,
|
|
0x53, 0x14, 0x24, 0x34, 0xe8, 0x8c, 0xa8, 0xef,
|
|
0x52, 0xfe, 0x06, 0x2c, 0x20, 0x88, 0x4f, 0xa6,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno1_vec1_ctxt[SECSIZE] = {
|
|
0x2f, 0x69, 0x3e, 0x95, 0x87, 0x91, 0x99, 0xd4,
|
|
0xd9, 0x5d, 0xf2, 0x52, 0x32, 0x54, 0x2a, 0x80,
|
|
0xa0, 0x77, 0x6e, 0x73, 0x15, 0xb4, 0xc9, 0x13,
|
|
0x85, 0xed, 0x79, 0x9b, 0x84, 0x0a, 0x7e, 0xdb,
|
|
0xee, 0x09, 0x78, 0x11, 0x28, 0xd5, 0x26, 0xec,
|
|
0x1d, 0x52, 0xba, 0x33, 0x26, 0xeb, 0x91, 0xc6,
|
|
0x4b, 0xf0, 0x38, 0xdf, 0x9f, 0x9d, 0x6c, 0xd8,
|
|
0x49, 0x83, 0x88, 0xbe, 0x62, 0x2d, 0x5e, 0x88,
|
|
0xc0, 0x35, 0xe4, 0xc3, 0xc9, 0x9f, 0x62, 0x59,
|
|
0x16, 0xa7, 0x2e, 0xc0, 0xda, 0x3c, 0x2e, 0x10,
|
|
0x53, 0xf0, 0x84, 0x27, 0x38, 0xd0,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xd6, 0x09,
|
|
0xac, 0xf8, 0x39, 0x5d, 0x4c, 0x68, 0x69, 0x99,
|
|
0x08, 0xd4, 0xf5, 0x39, 0x6d, 0x78, 0xde, 0xb5,
|
|
0x6f, 0x34, 0xc4, 0x28, 0x73, 0x6c, 0x29, 0xa1,
|
|
0xef, 0xfe, 0xed, 0x56, 0xb2, 0x70, 0x7b, 0xd5,
|
|
0x5b, 0xd1, 0x09, 0x6a, 0x9a, 0x59, 0xe9, 0x79,
|
|
0xe9, 0xee, 0xa4, 0x03, 0xc1, 0x67, 0xce, 0x62,
|
|
0xf6, 0x4f, 0x04, 0xa5, 0x04, 0x71, 0x13, 0xeb,
|
|
0x3d, 0x0a, 0x65, 0x2f, 0x57, 0xb0, 0xc0, 0xa4,
|
|
0xf2, 0x8d, 0x78, 0x90, 0xeb, 0xc9, 0x5e, 0x8b,
|
|
0xd8, 0xfb, 0xbc, 0x74, 0x1a, 0x70, 0x94, 0x2c,
|
|
0xeb, 0xf2, 0x5e, 0x6d, 0xbb, 0x96, 0x7a, 0x2c,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 2.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno1_vec2_ctxt[SECSIZE] = {
|
|
0xbc, 0x49, 0x35, 0x2c, 0xe3, 0x10, 0x12, 0x65,
|
|
0x7a, 0xf4, 0xde, 0xd3, 0xf8, 0xe1, 0x49, 0x97,
|
|
0x0a, 0x07, 0x93, 0x6c, 0xf8, 0x0e, 0xb7, 0xdf,
|
|
0x53, 0xba, 0x1e, 0x8e, 0x14, 0xbd, 0xf6, 0x81,
|
|
0xd6, 0xf6, 0x3d, 0xb2, 0xe7, 0x6a, 0x9d, 0x50,
|
|
0x68, 0xc2, 0x75, 0x8e, 0xfb, 0x44, 0xfa, 0xc8,
|
|
0x9f, 0x30, 0x15, 0xd5, 0xbe, 0xce, 0x04, 0xc1,
|
|
0x99, 0xde, 0x3d, 0x2b, 0xc1, 0xc4, 0x8a, 0xb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0xb9, 0x7e, 0xa0, 0x50, 0x41, 0x58, 0xb2, 0x13,
|
|
0x12, 0x44, 0xd2, 0x39, 0xf2, 0x76, 0x3c, 0x53,
|
|
0x36, 0xfe, 0x17, 0x74, 0x91, 0x8d, 0xbe, 0xc5,
|
|
0x40, 0xf7, 0xa2, 0xe9, 0x65, 0xd9, 0xdf, 0x80,
|
|
0x7b, 0xd9, 0xc3, 0x1f, 0xb4, 0xfc, 0x9f, 0x8d,
|
|
0x7a, 0x4e, 0x1e, 0x32, 0x6d, 0xb1, 0x82, 0x1e,
|
|
0x0c, 0xb6, 0x0b, 0xe6, 0x15, 0x82, 0x5c, 0xcc,
|
|
0xc8, 0x4a, 0x73, 0x56, 0x9d, 0x11, 0xfa, 0xcd,
|
|
0x21, 0x95, 0x23, 0x71, 0xe8, 0xfe, 0x06, 0x43,
|
|
0xf6, 0x17, 0x51, 0x28, 0x0d, 0xfb, 0x0a, 0x49,
|
|
0x1b, 0x35, 0x1e, 0x4a, 0x38, 0x08, 0x6b, 0xcd,
|
|
0x67, 0x21, 0x94, 0x09, 0x28, 0xca, 0x0a, 0x18,
|
|
0xdf, 0x6c, 0x86, 0x47, 0x10, 0x29, 0x81, 0x9a,
|
|
0x73, 0xba, 0x78, 0xbd, 0xc0, 0x61, 0xee, 0x23,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno1_vec3_ctxt[SECSIZE] = {
|
|
0x29, 0x9f, 0xb1, 0x0f, 0x7d, 0xb4, 0xd9, 0xbb,
|
|
0xf9, 0x06, 0x60, 0xdc, 0xb9, 0xeb, 0x73, 0x6e,
|
|
0xfe, 0xdb, 0x99, 0x29, 0xe8, 0x42, 0x46, 0xe7,
|
|
0x49, 0xcf, 0x90, 0x2d, 0x08, 0xd7, 0xd5, 0xbf,
|
|
0x0f, 0x4f, 0x66, 0xce, 0xcd, 0xb1, 0x8a, 0xc7,
|
|
0x47, 0xc9, 0x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0x96, 0x90,
|
|
0xdd, 0xe3, 0x25, 0x22, 0x46, 0x7b, 0x49, 0xde,
|
|
0x72, 0x55, 0xf3, 0x30, 0x62, 0x5f, 0x7a, 0x2a,
|
|
0x37, 0x88, 0xea, 0x57, 0x99, 0x64, 0x50, 0x2d,
|
|
0xd3, 0x6a, 0x09, 0x4b, 0xd6, 0x61, 0xf2, 0x22,
|
|
0x53, 0x36, 0xf7, 0x42, 0x21, 0xde, 0xda, 0xcb,
|
|
0x8b, 0x6f, 0xf3, 0x4e, 0x2c, 0x16, 0xfb, 0xfc,
|
|
0x13, 0xa7, 0xd1, 0xd8, 0xfd, 0x16, 0x39, 0x20,
|
|
0xe0, 0xb2, 0xb4, 0xd5, 0x40, 0x93, 0x30, 0xf3,
|
|
0xab, 0x88, 0xe3, 0xfb, 0xbe, 0xb8, 0x02, 0x3a,
|
|
0x78, 0x2d, 0x56, 0x4b, 0x92, 0x5b, 0x0a, 0x8d,
|
|
0x18, 0xa4, 0x5b, 0x11, 0x60, 0x0b, 0x45, 0xad,
|
|
0x0b, 0x64, 0x96, 0x7d, 0x84, 0xf2, 0x20, 0xa8,
|
|
0x95, 0x78, 0xb3, 0xb5, 0x98, 0x1f, 0xa7, 0x3e,
|
|
0x30, 0x77, 0x43, 0xd2, 0x8c, 0x20, 0xc5, 0x5e,
|
|
0x76, 0xcd, 0x2c, 0x7c, 0xfa, 0x34, 0x36, 0xda,
|
|
0x39, 0x00, 0x2e, 0x69, 0x4a, 0xb3, 0x0f, 0x6f,
|
|
};
|
|
|
|
const struct testvec aes_cbc_128_1_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno1_vec0_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno1_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno1_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno1_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 0.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno8_vec0_ctxt[SECSIZE] = {
|
|
0xa6, 0x64, 0xef, 0x0f, 0xc4, 0x45, 0xcc, 0x5e,
|
|
0xf8, 0x27, 0x42, 0x5e, 0xbd, 0x93, 0x99, 0xcd,
|
|
0x79, 0xa8, 0x7d, 0x72, 0xc4, 0x02, 0x99, 0xa6,
|
|
0xe4, 0x69, 0x57, 0x82, 0xdf, 0x32, 0x4e, 0x67,
|
|
0x2a, 0xd9, 0x58, 0x8c, 0x9f, 0xfc, 0x4d, 0xcf,
|
|
0x7b, 0xa4, 0xa1, 0xfa, 0xd9, 0x4d, 0xb5, 0x67,
|
|
0x06, 0x4a, 0x9e, 0x6d, 0xe8, 0xaa, 0xdd, 0xae,
|
|
0x8c, 0xda, 0xcf, 0x26, 0xd5, 0x94, 0x8d, 0x12,
|
|
0xf8, 0xdd, 0x21, 0x4c, 0xcb, 0xc8, 0x5d, 0xd1,
|
|
0x6a, 0x89, 0x37, 0xd0, 0x32, 0xe4, 0x87, 0xbc,
|
|
0x5d, 0xef, 0xca, 0x38, 0xd5, 0x08, 0xfb, 0xcf,
|
|
0xb7, 0x8d, 0x65, 0x52, 0x13, 0xea, 0x2d, 0x30,
|
|
0xd3, 0x9a, 0xe8, 0x9c, 0x76, 0x25, 0x44, 0x2a,
|
|
0xf1, 0xe1, 0xbb, 0xcd, 0xbc, 0x9c, 0xf5, 0xa3,
|
|
0xfb, 0x23, 0x53, 0x95, 0x61, 0xea, 0x46, 0x97,
|
|
0xf6, 0xbf, 0xdf, 0xf9, 0xb7, 0x94, 0x73, 0xa8,
|
|
0xc1, 0xaa, 0x64, 0xfb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de, 0x00,
|
|
0xe9, 0xaf, 0xd5, 0xf4, 0x36, 0x98, 0x14, 0x2d,
|
|
0x53, 0x20, 0x74, 0xab, 0x0c, 0xf6, 0xcd, 0x15,
|
|
0x32, 0xa6, 0x01, 0x8d, 0x24, 0x1b, 0x4b, 0x1f,
|
|
0xa3, 0xfc, 0x38, 0x82, 0x3a, 0xa1, 0xb5, 0x52,
|
|
0x53, 0xc7, 0x2b, 0x30, 0x7c, 0x65, 0xb9, 0x7d,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno8_vec1_ctxt[SECSIZE] = {
|
|
0x63, 0x45, 0x16, 0x0c, 0xe4, 0x4f, 0x51, 0xde,
|
|
0x74, 0xf8, 0x7b, 0xf5, 0x05, 0x17, 0x13, 0x1e,
|
|
0xa5, 0x3d, 0x84, 0xfa, 0x35, 0x5a, 0x2d, 0x3c,
|
|
0xb7, 0x61, 0x68, 0xff, 0xcd, 0x33, 0x1f, 0x0b,
|
|
0x53, 0x79, 0xf2, 0x2f, 0xbc, 0x8d, 0xac, 0xb9,
|
|
0xf9, 0xb7, 0x9c, 0x0a, 0x9d, 0xa1, 0x4d, 0x78,
|
|
0x9e, 0x4e, 0xfa, 0xe8, 0xc8, 0x46, 0x4b, 0x99,
|
|
0x91, 0x7e, 0x33, 0x6e, 0x18, 0x24, 0x01, 0xc3,
|
|
0x9f, 0x8c, 0x43, 0xb5, 0x15, 0x7e, 0xdd, 0xf9,
|
|
0x1b, 0xb0, 0xf2, 0xc3, 0x97, 0x1f, 0x7c, 0x3f,
|
|
0x43, 0x4c, 0x9f, 0x93, 0x29, 0x83, 0x8f, 0xad,
|
|
0xd1, 0x5e, 0x92, 0x1a, 0x17, 0xd1, 0xa0, 0x05,
|
|
0x6e, 0x62, 0x59, 0x80, 0x50, 0x6d, 0xe3, 0x28,
|
|
0x9a, 0x43, 0xdc, 0x81, 0x4f, 0x49, 0xc4, 0x98,
|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x12, 0xb7, 0x00, 0xfc, 0x6a, 0x79,
|
|
0x61, 0x0b, 0x43, 0xaa, 0x44, 0x48, 0x30, 0x15,
|
|
0x48, 0x76, 0x27, 0x32, 0x7a, 0x2e, 0x25, 0x6a,
|
|
0x8c, 0x8c, 0x64, 0x67, 0x86, 0x54, 0x4a, 0x93,
|
|
0x14, 0xfe, 0x81, 0xf5, 0xcf, 0x98, 0x92, 0xd3,
|
|
0x92, 0xf5, 0x6a, 0x74, 0x28, 0x10, 0x6b, 0xd4,
|
|
0x1d, 0x64, 0x7e, 0x05, 0x32, 0xba, 0xf7, 0x4c,
|
|
0xe9, 0xa8, 0xa9, 0xc5, 0x35, 0x34, 0x26, 0x41,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 2.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno8_vec2_ctxt[SECSIZE] = {
|
|
0x64, 0x7b, 0x62, 0x7a, 0xa6, 0xa9, 0xb3, 0x47,
|
|
0xbc, 0x03, 0x14, 0x3d, 0x9b, 0x56, 0xfc, 0x13,
|
|
0x08, 0x32, 0x81, 0xe3, 0x57, 0x3c, 0x0d, 0xbb,
|
|
0x85, 0x44, 0x47, 0x12, 0xc4, 0x80, 0x35, 0x37,
|
|
0xe1, 0xb4, 0x3f, 0x35, 0x98, 0x7c, 0xb0, 0x3b,
|
|
0x85, 0xab, 0x3d, 0x0b, 0xd3, 0x6f, 0xf9, 0x92,
|
|
0x00, 0x6b, 0x18, 0xe7, 0x31, 0x8b, 0x77, 0x4c,
|
|
0xd0, 0x7b, 0x1d, 0xfc, 0x95, 0xe6, 0x02, 0x01,
|
|
0x9c, 0x17, 0x4d, 0x9b, 0x3a, 0x1d, 0x12, 0x23,
|
|
0xd4, 0x24, 0xf8, 0x47, 0x5e, 0x2d, 0xfd, 0xc8,
|
|
0x74, 0x28, 0xb4, 0x3a, 0x99, 0x6b, 0xcc, 0xba,
|
|
0xe5, 0x51, 0x0b, 0xab, 0x4d, 0x63, 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|
|
0x20, 0xf1, 0xd4, 0x5f, 0x94, 0xc3, 0x6f, 0x21,
|
|
0x5e, 0xf2, 0x77, 0x5a, 0x42, 0xfd, 0xd3, 0xc4,
|
|
0x31, 0xaf, 0xd6, 0x6c, 0x6c, 0xde, 0x8c, 0x50,
|
|
0x01, 0x8f, 0x57, 0x90, 0x88, 0x43, 0xf9, 0x44,
|
|
0x09, 0x4d, 0x27, 0x58, 0x9f, 0xae, 0x50, 0x28,
|
|
0x12, 0x47, 0x20, 0x79, 0x2b, 0xe4, 0x02, 0x97,
|
|
0xcd, 0xab, 0x53, 0x28, 0x8f, 0x8f, 0xe3, 0x3b,
|
|
0xd6, 0xc9, 0xc8, 0xff, 0xbf, 0x18, 0x3b, 0x75,
|
|
0xdb, 0xcf, 0x07, 0x8c, 0xfe, 0x58, 0xee, 0x75,
|
|
0x01, 0x98, 0x98, 0xe4, 0x60, 0xfe, 0xe6, 0x7f,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_128_encblkno8_vec3_ctxt[SECSIZE] = {
|
|
0x98, 0xae, 0x82, 0x1d, 0x76, 0x3a, 0xfe, 0x80,
|
|
0x04, 0xa3, 0x43, 0xf0, 0x06, 0x45, 0x83, 0xb7,
|
|
0xe2, 0xb5, 0x73, 0x46, 0x78, 0x01, 0x2f, 0xd6,
|
|
0x0d, 0x49, 0x64, 0x4c, 0xeb, 0x8d, 0xdc, 0xa9,
|
|
0xdc, 0xea, 0x22, 0x25, 0xd4, 0x8f, 0xba, 0x9f,
|
|
0xd4, 0x7a, 0x3c, 0x9e, 0xd0, 0xd9, 0xcd, 0xa4,
|
|
0x12, 0xdf, 0x8f, 0x50, 0x24, 0x18, 0xa2, 0x0b,
|
|
0xd9, 0x7f, 0xda, 0x78, 0xd6, 0x11, 0xf3, 0x99,
|
|
0xc4, 0xec, 0x95, 0xe2, 0x85, 0xe1, 0xa0, 0x0d,
|
|
0x07, 0x22, 0x56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 0x1f, 0xf5, 0xe2, 0xb5, 0xe4, 0xa8,
|
|
0x42, 0xe3, 0x3d, 0x06, 0x6b, 0x50, 0xbb, 0xa1,
|
|
0x6b, 0x63, 0xe5, 0x60, 0x28, 0x07, 0x49, 0x06,
|
|
0x61, 0x0e, 0xa3, 0x6c, 0xc3, 0xc8, 0x3e, 0x5a,
|
|
0x9c, 0xa5, 0xb3, 0x9b, 0x8d, 0x46, 0xb9, 0xf5,
|
|
0x4a, 0x4d, 0xbe, 0xc0, 0xc1, 0x24, 0x92, 0x09,
|
|
0x7c, 0x9a, 0x21, 0x2c, 0x08, 0x8a, 0x0d, 0xfc,
|
|
0xff, 0xda, 0xdc, 0xf1, 0x45, 0x66, 0xf9, 0xcd,
|
|
0x64, 0x7c, 0x2f, 0x0e, 0x95, 0x5e, 0xec, 0x92,
|
|
0xd1, 0x03, 0x03, 0xa0, 0xcc, 0x73, 0x92, 0x15,
|
|
0x74, 0x42, 0x54, 0x48, 0x77, 0xbe, 0x96, 0xfb,
|
|
0x1f, 0x0c, 0x7a, 0x25, 0x67, 0x6b, 0x85, 0x71,
|
|
0x06, 0x15, 0xd3, 0x11, 0xfe, 0xf7, 0xa9, 0xb1,
|
|
};
|
|
|
|
const struct testvec aes_cbc_128_8_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno8_vec0_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno8_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno8_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_128_encblkno8_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno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x3c, 0xa4, 0xa1, 0x08, 0x36, 0x0b, 0xe9,
|
|
0x77, 0xd0, 0xe3, 0x45, 0x7d, 0x99, 0x75, 0xc3,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno1_vec1_ctxt[SECSIZE] = {
|
|
0xe6, 0x41, 0x75, 0xd6, 0x80, 0xdf, 0x44, 0x37,
|
|
0xa7, 0xa2, 0xb2, 0x29, 0x0d, 0xf0, 0x02, 0x78,
|
|
0x92, 0xb2, 0x06, 0x5f, 0x86, 0xd3, 0x9c, 0xa3,
|
|
0xd0, 0xc5, 0x08, 0x03, 0x6d, 0x41, 0x9d, 0x61,
|
|
0xb4, 0xb9, 0xa1, 0x69, 0x6e, 0x3a, 0x78, 0xd7,
|
|
0x04, 0x94, 0xf2, 0x53, 0xed, 0xd1, 0xf6, 0xd8,
|
|
0x98, 0xe2, 0x49, 0x75, 0x15, 0x85, 0xe0, 0x78,
|
|
0x5b, 0x28, 0x5e, 0xe6, 0xfa, 0x60, 0x3d, 0x4b,
|
|
0x8c, 0xf1, 0x1a, 0xfd, 0x1f, 0xe8, 0xad, 0xb4,
|
|
0xa1, 0xe7, 0xd3, 0x71, 0x16, 0xdf, 0xc6, 0x95,
|
|
0xd4, 0x43, 0xaf, 0x92, 0xab, 0x74, 0x0f, 0x77,
|
|
0x75, 0x4d, 0xd7, 0x13, 0x97, 0x18, 0xea, 0x43,
|
|
0x92, 0x0d, 0x88, 0xc8, 0x41, 0xf7, 0x15, 0x34,
|
|
0x0f, 0x63, 0xbf, 0x50, 0x18, 0xbe, 0x9d, 0x3b,
|
|
0xfc, 0x17, 0x7d, 0x03, 0x39, 0xc2, 0x39, 0x28,
|
|
0xb2, 0x23, 0x1c, 0x7f, 0x3f, 0x19, 0x6c, 0x2f,
|
|
0x64, 0xbd, 0xc9, 0x7d, 0xbe, 0x98, 0xe0, 0x83,
|
|
0xa4, 0x48, 0xfc, 0x89,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0x69,
|
|
0x23, 0x97, 0x62, 0x6e, 0xae, 0x54, 0x9c, 0x82,
|
|
0x92, 0x50, 0x74, 0x07, 0x4a, 0xb1, 0xdc, 0xcf,
|
|
0x53, 0x1d, 0xc8, 0x29, 0x1f, 0x6e, 0xf1, 0x13,
|
|
0xec, 0xb6, 0x60, 0xb1, 0x4c, 0x9d, 0xd7, 0x77,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 2.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno1_vec2_ctxt[SECSIZE] = {
|
|
0x33, 0xfd, 0xfa, 0x44, 0x64, 0x75, 0x22, 0x7e,
|
|
0xe3, 0xb3, 0xa0, 0x75, 0x99, 0x96, 0xc0, 0xec,
|
|
0x56, 0x06, 0x7d, 0x19, 0x0b, 0x66, 0x89, 0xe0,
|
|
0x69, 0x1d, 0x93, 0x91, 0xd7, 0x0f, 0xf8, 0xf5,
|
|
0x5a, 0x39, 0x30, 0xad, 0x64, 0x42, 0x06, 0xa3,
|
|
0xce, 0x3f, 0x67, 0xd6, 0x6e, 0xcd, 0x3b, 0xf5,
|
|
0x03, 0x2b, 0x07, 0x83, 0x18, 0x1a, 0x4f, 0x4c,
|
|
0xe7, 0x6b, 0xe8, 0xf9, 0x19, 0xa5, 0x23, 0x8f,
|
|
0x46, 0x35, 0x13, 0x7b, 0x61, 0x05, 0xfc, 0x7d,
|
|
0x17, 0x39, 0x03, 0xa8, 0xec, 0x7a, 0xd2, 0x5f,
|
|
0x91, 0xa7, 0x26, 0x07, 0x9d, 0xd7, 0x0c, 0xd7,
|
|
0xd4, 0x8e, 0x37, 0xf3, 0x1a, 0x3c, 0x04, 0x83,
|
|
0x04, 0x71, 0x06, 0xa6, 0x5f, 0x82, 0xe0, 0x6d,
|
|
0x87, 0x5c, 0x7c, 0x03, 0x25, 0x03, 0x4b, 0x24,
|
|
0x07, 0x40, 0xad, 0xe4, 0x1d, 0x1d, 0xcb, 0x34,
|
|
0xc2, 0x53, 0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x94,
|
|
0x9e, 0xbb, 0xa8, 0x5d, 0x51, 0x05, 0x93, 0xdd,
|
|
0x2e, 0xb8, 0xdf, 0xcf, 0x83, 0xbc, 0xf6, 0x53,
|
|
0x95, 0x93, 0x27, 0xda, 0xa5, 0x20, 0x1b, 0x7d,
|
|
0x1d, 0xd9, 0x0c, 0xde, 0xe5, 0x3f, 0xc8, 0x60,
|
|
0x16, 0x32, 0x95, 0x24, 0xa7, 0x2b, 0x74, 0xf1,
|
|
0x67, 0xf9, 0xf2, 0x49, 0xda, 0x12, 0x97, 0xdd,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno1_vec3_ctxt[SECSIZE] = {
|
|
0xa5, 0x81, 0x86, 0x78, 0x4a, 0xd7, 0x5b, 0x83,
|
|
0xcf, 0xbf, 0x7e, 0x3c, 0xd7, 0xcd, 0xaf, 0xfa,
|
|
0x82, 0x18, 0xce, 0xbd, 0x8b, 0xe6, 0xd9, 0x39,
|
|
0x22, 0x2d, 0x1e, 0x75, 0x65, 0xee, 0x61, 0xf2,
|
|
0xc3, 0x8b, 0xf4, 0x40, 0x03, 0x73, 0x8a, 0x21,
|
|
0x9f, 0xf3, 0xcc, 0x93, 0x08, 0x3d, 0xff, 0x8a,
|
|
0xbc, 0x0f, 0x19, 0xa1, 0x9f, 0xc8, 0x73, 0xe8,
|
|
0xa6, 0x14, 0x2e, 0x43, 0x19, 0x79, 0x61, 0x35,
|
|
0x8d, 0x55, 0x06, 0xeb, 0x96, 0xe7, 0xf5, 0x4b,
|
|
0x95, 0x5f, 0x9b, 0xb2, 0x18, 0x0d, 0x13, 0xc2,
|
|
0x96, 0x79, 0x50, 0x78, 0x98, 0x50, 0x88, 0x2b,
|
|
0xab, 0x05, 0x66, 0xa1, 0x3a, 0x25, 0x85, 0xe2,
|
|
0xd0, 0xe2, 0xac, 0xb5, 0x26, 0xde, 0x95, 0x04,
|
|
0x45, 0xe7, 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, 0xcd, 0x2b,
|
|
0x3e, 0xe8, 0x1b, 0x60, 0xe8, 0xea, 0xaf, 0x09,
|
|
0xbb, 0xee, 0xce, 0xbc, 0xa0, 0x9b, 0x17, 0x90,
|
|
0x42, 0x40, 0x18, 0x35, 0x2e, 0x17, 0xa0, 0x6e,
|
|
0x43, 0xe7, 0xac, 0x89, 0x96, 0x3c, 0x16, 0xe0,
|
|
0xdb, 0x09, 0x51, 0x4a, 0x45, 0x33, 0x63, 0xe9,
|
|
0x4e, 0x3f, 0x32, 0x34, 0x36, 0x43, 0xd5, 0x0c,
|
|
0x5a, 0x2e, 0x0e, 0x8b, 0x80, 0xb7, 0xf4, 0xe4,
|
|
0x99, 0x9b, 0x05, 0xf5, 0xb2, 0xe4, 0x03, 0xe4,
|
|
};
|
|
|
|
const struct testvec aes_cbc_192_1_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno1_vec0_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno1_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno1_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno1_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 0.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno8_vec0_ctxt[SECSIZE] = {
|
|
0x87, 0x9c, 0x05, 0xd6, 0x25, 0xb9, 0xe0, 0xbe,
|
|
0x78, 0x21, 0x85, 0x81, 0x8e, 0x2f, 0x13, 0x5e,
|
|
0xf2, 0x73, 0x11, 0xfa, 0x73, 0x77, 0x93, 0x5e,
|
|
0x71, 0x16, 0x98, 0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, 0x06, 0x91, 0xd6, 0x18, 0x3d, 0xeb, 0x8b,
|
|
0x3f, 0x9b, 0x37, 0x9e, 0x2e, 0xd2, 0xec, 0xe5,
|
|
0x2d, 0xf0, 0x3f, 0x45, 0xd5, 0x9d, 0xb9, 0x28,
|
|
0x89, 0xe4, 0x0c, 0xa9, 0x38, 0xca, 0x22, 0x56,
|
|
0x53, 0xdf, 0x49, 0xba, 0x5d, 0x99, 0xd6, 0x4b,
|
|
0x1d, 0x0d, 0x6d, 0xee, 0x7c, 0xf2, 0x6f, 0x50,
|
|
0x04, 0xf1, 0xf8, 0x49, 0xd1, 0x2f, 0x50, 0x3e,
|
|
0xf1, 0x08, 0x49, 0x17, 0x08, 0xd2, 0xac, 0x5d,
|
|
0x58, 0xe7, 0x27, 0xe6, 0x59, 0x02, 0x9f, 0x1c,
|
|
0x40, 0xff, 0x6c, 0x67, 0xae, 0x49, 0x1a, 0x2a,
|
|
0xab, 0xd9, 0x63, 0x25, 0x2d, 0x9b, 0xd8, 0x1a,
|
|
0x41, 0xa6, 0xea, 0x72, 0xfd, 0x56, 0xa1, 0x57,
|
|
0x59, 0xdd, 0xf5, 0xa3, 0xb2, 0x2f, 0x64, 0xb1,
|
|
0xc5, 0xfe, 0x8d, 0x9b, 0x93, 0xd1, 0x51, 0x77,
|
|
0x13, 0x50, 0x74, 0x30, 0x28, 0xe4, 0x7a, 0x06,
|
|
0x69, 0xd4, 0xa8, 0x0a, 0xae, 0x02, 0x4a, 0x61,
|
|
0x24, 0xc2, 0xcd, 0xc8, 0xd3, 0x12, 0x2e, 0xac,
|
|
0x9a, 0x0c, 0x24, 0x06, 0xb8, 0x1e, 0x3d, 0x29,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno8_vec1_ctxt[SECSIZE] = {
|
|
0x1e, 0x3b, 0x66, 0x76, 0xd9, 0x9e, 0xf7, 0x82,
|
|
0x17, 0x76, 0x69, 0x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x74, 0x2b, 0x6d, 0xcc, 0x00, 0x76, 0x3e,
|
|
0x3b, 0x85, 0xfa, 0xef, 0x87, 0x70, 0x53, 0x4e,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_192_encblkno8_vec3_ctxt[SECSIZE] = {
|
|
0xfe, 0xad, 0xf3, 0x4a, 0x9d, 0x64, 0x4e, 0x5d,
|
|
0xaf, 0xa8, 0x44, 0x7e, 0xc9, 0x75, 0xe8, 0xd0,
|
|
0x87, 0x73, 0x66, 0x4c, 0x77, 0x00, 0xfb, 0x7b,
|
|
0x04, 0xe7, 0xd8, 0x82, 0x75, 0xe3, 0xa5, 0xbc,
|
|
0xf3, 0x80, 0xae, 0x7c, 0xc9, 0x75, 0x9a, 0xc1,
|
|
0x73, 0x49, 0x69, 0xf6, 0xa0, 0x49, 0x6e, 0x77,
|
|
0x5f, 0x9b, 0x95, 0x9b, 0x9f, 0x41, 0x54, 0x57,
|
|
0x0e, 0x3c, 0xe5, 0x2c, 0xbb, 0xbf, 0xd5, 0x76,
|
|
0xf6, 0xb6, 0x05, 0xaa, 0x20, 0x5b, 0xdb, 0xcb,
|
|
0x81, 0xad, 0x0c, 0x8a, 0x68, 0x94, 0x7d, 0x88,
|
|
0xdc, 0x15, 0x6c, 0x89, 0x97, 0x53, 0x30, 0x96,
|
|
0x4a, 0x54, 0xf9, 0x88, 0x00, 0xf7, 0x3b, 0x99,
|
|
0xfc, 0x82, 0xe3, 0x48, 0xd2, 0x16, 0x2b, 0xba,
|
|
0xd4, 0xba, 0x24, 0xd0, 0xd1, 0xb0, 0x8e, 0xcd,
|
|
0x77, 0xdc, 0x01, 0xdf, 0xb2, 0x20, 0xc5, 0xa7,
|
|
0x48, 0x2a, 0xcf, 0x56, 0xc8, 0x63, 0x6e, 0xc9,
|
|
0xa8, 0xa4, 0xc2, 0x9c, 0x66, 0x25, 0x50, 0x77,
|
|
0x08, 0x51, 0x92, 0xce,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2b, 0xfc,
|
|
0x41, 0x2e, 0xb2, 0xd0, 0xb4, 0x00, 0x29, 0xc1,
|
|
0x46, 0xdf, 0xc1, 0xbd, 0x15, 0x59, 0xa3, 0x6a,
|
|
0xc8, 0x2f, 0x29, 0x28, 0x12, 0x9b, 0x1e, 0xea,
|
|
0x4e, 0xa9, 0x80, 0xa1, 0xb8, 0x89, 0x21, 0x3b,
|
|
};
|
|
|
|
const struct testvec aes_cbc_192_8_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno8_vec0_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno8_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno8_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_192_encblkno8_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 0.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno1_vec0_ctxt[SECSIZE] = {
|
|
0x1a, 0xa4, 0xe3, 0x09, 0x23, 0x2e, 0x91, 0x1b,
|
|
0xa8, 0x3e, 0xda, 0x92, 0xb3, 0x22, 0xd2, 0xe8,
|
|
0x8b, 0xed, 0x6c, 0xa7, 0x78, 0xe6, 0x32, 0x25,
|
|
0xc4, 0x88, 0xd5, 0xb7, 0x6e, 0xef, 0xbf, 0x37,
|
|
0x00, 0xd9, 0xb2, 0x55, 0x10, 0x4f, 0x7d, 0x84,
|
|
0x3a, 0xae, 0xd2, 0xc6, 0x48, 0xdd, 0x3c, 0xd5,
|
|
0x9b, 0xa7, 0xf8, 0xc2, 0xda, 0x6d, 0x14, 0xa2,
|
|
0xdc, 0x54, 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, 0x50, 0x07,
|
|
0x0e, 0x7b, 0x95, 0x69, 0x1b, 0x82, 0xba, 0x50,
|
|
0x93, 0x4f, 0x9a, 0x8e, 0x11, 0x9b, 0x64, 0xf5,
|
|
0x6a, 0xd4, 0x81, 0xf0, 0x1f, 0xb8, 0x85, 0x90,
|
|
0x9c, 0x79, 0xde, 0xcb, 0x50, 0xba, 0xa9, 0x56,
|
|
0x66, 0xd1, 0x1e, 0x78, 0xa8, 0x6a, 0xd5, 0xa5,
|
|
0x83, 0x73, 0xe2, 0x88, 0xf2, 0x04, 0x33, 0x61,
|
|
0xdf, 0x89, 0xd5, 0x3d, 0x03, 0x4e, 0x94, 0xb0,
|
|
0x0f, 0x8d, 0x4d, 0xb4, 0x09, 0xb2, 0xf1, 0xb0,
|
|
0xe7, 0xfe, 0xb0, 0x18, 0xe2, 0xfc, 0x92, 0xeb,
|
|
0x2d, 0x7d, 0x56, 0x29, 0xbd, 0x34, 0x20, 0x7c,
|
|
0xb6, 0xe7, 0x7b, 0xd7, 0x95, 0xa5, 0x0d, 0x10,
|
|
0xbc, 0x7d, 0x9d, 0xd9, 0xbe, 0xc7, 0x23, 0x44,
|
|
0x37, 0xb3, 0x98, 0x36, 0x33, 0x1a, 0x11, 0xfe,
|
|
0x41, 0xea, 0x59, 0x48, 0x75, 0x34, 0xf6, 0xc4,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno1_vec1_ctxt[SECSIZE] = {
|
|
0x58, 0xfc, 0x1e, 0x48, 0x66, 0x7d, 0x91, 0xc7,
|
|
0x56, 0xa3, 0x41, 0x89, 0xe8, 0x1e, 0x02, 0x77,
|
|
0x93, 0x38, 0x12, 0x99, 0x06, 0x0d, 0xf3, 0x6d,
|
|
0x2a, 0x5d, 0x3d, 0x7b, 0x4e, 0x05, 0x4f, 0x8f,
|
|
0xe3, 0x86, 0x76, 0xfe, 0x11, 0x9d, 0xde, 0xd4,
|
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ed, 0x2b, 0x99, 0x74, 0x1c, 0x16,
|
|
0x45, 0x55, 0x21, 0xbc, 0x7c, 0x52, 0x87, 0x0f,
|
|
0xb9, 0xbf, 0x71, 0x7c, 0x3a, 0x81, 0x72, 0x97,
|
|
0xf8, 0x86, 0x61, 0x20, 0x17, 0xd8, 0xc8, 0xe0,
|
|
0xfc, 0x42, 0x0f, 0x5b, 0xd6, 0x7e, 0x99, 0x81,
|
|
0x5c, 0x2e, 0x2e, 0x3e, 0xe8, 0xce, 0x12, 0xcf,
|
|
0x2c, 0xe6, 0x7a, 0x00, 0x5d, 0x36, 0x00, 0x92,
|
|
0x60, 0xc5, 0xc0, 0xfd, 0xe0, 0xa3, 0xb9, 0x3e,
|
|
0x92, 0xf8, 0x8f, 0xe2, 0x0f, 0xe5, 0xb4, 0x6a,
|
|
0xd6, 0x5b, 0xa4, 0x5d, 0xf9, 0xef, 0x7e, 0xae,
|
|
0xdd, 0xd0, 0x5d, 0x40, 0xfe, 0xa7, 0xed, 0xda,
|
|
0xa9, 0x48, 0x1d, 0x6f, 0xc2, 0xd3, 0x35, 0x65,
|
|
0xd8, 0x67, 0xc2, 0x9d, 0xed, 0xf7, 0x9f, 0x7b,
|
|
0x7c, 0xd4, 0x03, 0xe0, 0xa6, 0xf9, 0x3c, 0xd0,
|
|
0x21, 0x98, 0x60, 0xa6, 0x59, 0x86, 0xbd, 0x40,
|
|
0x17, 0x47, 0x82, 0xb9, 0xe1, 0x11, 0x8d, 0x4b,
|
|
0xcd, 0x1f, 0x54, 0x96, 0x17, 0x42, 0x22, 0x44,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 2.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno1_vec2_ctxt[SECSIZE] = {
|
|
0x1d, 0x65, 0xb2, 0x4e, 0xfa, 0x3f, 0xdb, 0xab,
|
|
0x34, 0x9d, 0x37, 0x03, 0x17, 0x44, 0xed, 0x5b,
|
|
0xf7, 0x1b, 0x6b, 0xc0,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, 0xdd, 0xa2,
|
|
0x9d, 0x71, 0xb1, 0xe0, 0x86, 0x58, 0xc3, 0x57,
|
|
0xd5, 0x5a, 0x6f, 0xdc, 0xe5, 0xcc, 0x64, 0xc7,
|
|
0x80, 0x2a, 0xef, 0x90, 0x91, 0x96, 0xb4, 0xeb,
|
|
0xda, 0x3b, 0x7b, 0xbc, 0x14, 0x60, 0x52, 0xe5,
|
|
0xe5, 0xc8, 0x6a, 0x99, 0x46, 0x9d, 0x00, 0x77,
|
|
0x3b, 0x60, 0x75, 0x04, 0x06, 0x4a, 0x5a, 0x64,
|
|
0x6f, 0x2f, 0x58, 0x77, 0x27, 0x9a, 0xc5, 0x90,
|
|
0x37, 0xa7, 0xf3, 0x89, 0x72, 0x47, 0x4e, 0x08,
|
|
0xa5, 0x79, 0x11, 0x2f, 0x22, 0x5a, 0xbb, 0xcf,
|
|
0x76, 0xb9, 0x28, 0xc8, 0xc4, 0x5a, 0xe5, 0x90,
|
|
0xf7, 0x02, 0xe4, 0xf9, 0x0c, 0x4c, 0x9a, 0xb1,
|
|
0xa7, 0x99, 0x34, 0xd4, 0x77, 0x66, 0xff, 0x3c,
|
|
0x50, 0x9a, 0xff, 0x13, 0x49, 0xd6, 0x5a, 0xf6,
|
|
0x17, 0x6f, 0xca, 0x1a, 0xef, 0x0a, 0x2d, 0xf1,
|
|
0xdf, 0xd0, 0xa5, 0x6f, 0xa6, 0x22, 0x3c, 0x1f,
|
|
0xcf, 0xe7, 0xec, 0x23, 0x39, 0x6e, 0xc0, 0x37,
|
|
0x31, 0x84, 0xff, 0xe2, 0x5a, 0xd6, 0x88, 0x74,
|
|
0x15, 0x15, 0x46, 0x21, 0x00, 0xe4, 0x13, 0x9a,
|
|
0xfa, 0xb2, 0x49, 0x7e, 0x79, 0xfb, 0x8a, 0x2a,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno1, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno1_vec3_ctxt[SECSIZE] = {
|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0, 0xeb, 0x5b, 0x60, 0x39,
|
|
};
|
|
|
|
const struct testvec aes_cbc_256_1_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno1_vec0_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno1_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno1_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno1_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 0.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno8_vec0_ctxt[SECSIZE] = {
|
|
0xe5, 0x55, 0xd9, 0xae, 0xc0, 0x66, 0x2d, 0x2f,
|
|
0x11, 0xb1, 0x27, 0xd2, 0xb2, 0x73, 0xe4, 0x0a,
|
|
0x85, 0xb5, 0x3c, 0x79, 0x78, 0xd6, 0x35, 0x3d,
|
|
0x46, 0xac, 0xa3, 0x81, 0x55, 0x76, 0x86, 0xfc,
|
|
0x37, 0xa0, 0x95, 0xc2, 0x30, 0xc9, 0x19, 0xc2,
|
|
0x5f, 0xb0, 0x13, 0xa2, 0xa8, 0xe1, 0xc7, 0xb7,
|
|
0x61, 0x54, 0xd8, 0xe6, 0xca, 0x94, 0x6f, 0x47,
|
|
0x87, 0x33, 0x58, 0xd9, 0xd5, 0xd2, 0x95, 0x73,
|
|
0x87, 0x9a, 0x31, 0xe5, 0x2e, 0x95, 0x83, 0x7d,
|
|
0xdc, 0x0f, 0xc5, 0x2f, 0x14, 0xbc, 0x80, 0xac,
|
|
0x47, 0xd6, 0xd8, 0x17, 0x9e, 0xf7, 0xff, 0x5b,
|
|
0x85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, 0x76, 0x26, 0x6e,
|
|
0x75, 0x14, 0x7e, 0x63, 0xc6, 0x7a, 0x4f, 0x5c,
|
|
0xfe, 0x4b, 0x80, 0xee, 0xb3, 0x32, 0x8d, 0x25,
|
|
0x1c, 0x80, 0x7b, 0x3d, 0xd3, 0x84, 0x01, 0x1e,
|
|
0x16, 0xa4, 0xca, 0x0d, 0x38, 0x40, 0x03, 0x6f,
|
|
0x81, 0x8b, 0x5c, 0xad, 0x22, 0xfa, 0x6f, 0xeb,
|
|
0x60, 0xa1, 0xcb, 0x2d, 0x97, 0xf8, 0xa6, 0x5e,
|
|
0xbe, 0x93, 0xb7, 0xe6, 0x66, 0xbf, 0x9b, 0xd2,
|
|
0x5c, 0x31, 0xcc, 0x70, 0x0c, 0xf1, 0xfb, 0x9f,
|
|
0x09, 0x1b, 0xc2, 0x85, 0x2f, 0x22, 0x7c, 0x95,
|
|
0x58, 0x09, 0xce, 0x9c, 0x7c, 0x50, 0xca, 0x89,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 1.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno8_vec1_ctxt[SECSIZE] = {
|
|
0x37, 0x4d, 0x25, 0xdb, 0x35, 0xe0, 0x8b, 0x82,
|
|
0x5f, 0x77, 0xd2, 0x53, 0xd1, 0x1f, 0xf0, 0x91,
|
|
0x5b, 0xd8, 0x93, 0x2f, 0xb2, 0x81, 0xbd, 0x75,
|
|
0xf0, 0xd8, 0xff, 0x46, 0x8c, 0x9d, 0xf6, 0xe2,
|
|
0x99, 0x1e, 0x76, 0x9d, 0x00, 0x3a, 0xe3, 0xcf,
|
|
0x6d, 0x24, 0xa8, 0xe8, 0xb4, 0xa7, 0xa0, 0x87,
|
|
0xa8, 0x43, 0x01, 0x21, 0x29, 0x70, 0x39, 0x2d,
|
|
0x0b, 0x2a, 0xe9, 0x11, 0x57, 0x86, 0x13, 0xd4,
|
|
0x1c, 0x1b, 0x59, 0x19, 0xc4, 0x7d, 0x2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, 0xc8, 0x17, 0x04, 0x87, 0x2c,
|
|
0x89, 0x86, 0x24, 0xec, 0x52, 0x12, 0x6a, 0x51,
|
|
0x1e, 0x2a, 0x5e, 0x96, 0xfb, 0xac, 0x95, 0x4a,
|
|
0x1a, 0x06, 0x8f, 0xdf, 0xa7, 0x26, 0xeb, 0x6c,
|
|
0x79, 0x4a, 0x77, 0xea, 0xb3, 0xb1, 0x3a, 0x19,
|
|
0xe6, 0x5e, 0xe2, 0x26, 0x1b, 0x85, 0x3c, 0x9b,
|
|
0x1d, 0x05, 0x1d, 0xbe, 0x5c, 0x25, 0x7f, 0x45,
|
|
0x4c, 0x09, 0x4c, 0xc1, 0x47, 0xa5, 0x44, 0xfc,
|
|
0x04, 0x2b, 0xad, 0x53, 0xac, 0x57, 0x22, 0x54,
|
|
0x13, 0x7c, 0xc9, 0x96, 0x44, 0xda, 0x74, 0x95,
|
|
0x6e, 0x8c, 0xe6, 0x6a, 0x05, 0x05, 0xf3, 0x8c,
|
|
0x81, 0xaf, 0xbc, 0xb1, 0x91, 0xe7, 0xfd, 0x81,
|
|
0x3f, 0x47, 0xc2, 0x6f, 0x0d, 0x62, 0xf6, 0x6e,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 2.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno8_vec2_ctxt[SECSIZE] = {
|
|
0x5a, 0x24, 0xfd, 0xee, 0x9a, 0x44, 0xfb, 0xac,
|
|
0x3e, 0x46, 0x53, 0x95, 0x9e, 0xeb, 0x1f, 0xd9,
|
|
0xfd, 0xc6, 0x4f, 0xae, 0x0b, 0xc8, 0xf2, 0xbd,
|
|
0x77, 0x16, 0x7a, 0x2e, 0x8e, 0xec, 0x7a, 0x53,
|
|
0xf4, 0xe0, 0x34, 0xba, 0x6e, 0xfa, 0xc4, 0x69,
|
|
0xd7, 0x50, 0x13, 0x03, 0xfb, 0xb9, 0x66, 0x96,
|
|
0xd4, 0x21, 0x67, 0xcc, 0x4c, 0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56,
|
|
0x4b, 0x6c, 0x26, 0x81, 0x27, 0xbf, 0x7e, 0x59,
|
|
0xcd, 0xab, 0x67, 0x8c, 0x4b, 0x6f, 0xa5, 0x47,
|
|
0x2c, 0x45, 0x28, 0x5a, 0x3d, 0x88, 0x53, 0xf9,
|
|
0x25, 0xdf, 0x5d, 0xba, 0xf7, 0x18, 0xa7, 0x3d,
|
|
0x79, 0xb4, 0x43, 0x59, 0x77, 0xf9, 0xd5, 0x5d,
|
|
0x4f, 0x31, 0x56, 0x8c, 0x21, 0xb5, 0xc0, 0xa2,
|
|
0xca, 0x04, 0x62, 0x2c, 0xc8, 0xa8, 0x11, 0x82,
|
|
0x1b, 0xde, 0xad, 0x20, 0x5b, 0xd2, 0x63, 0xfb,
|
|
0x6d, 0xba, 0xd4, 0xcc, 0xb4, 0x9d, 0xe8, 0xa8,
|
|
0xd1, 0x06, 0x81, 0xf0, 0xb9, 0xd4, 0x90, 0x30,
|
|
0xcd, 0x0a, 0xe8, 0xd2, 0x8c, 0x7a, 0xbf, 0xf6,
|
|
0x0d, 0xa0, 0xae, 0x1b, 0x21, 0x18, 0x93, 0x18,
|
|
0x71, 0xe1, 0xa0, 0x63, 0x5a, 0x9d, 0x4e, 0x6a,
|
|
0x52, 0x90, 0xaf, 0xdb, 0x26, 0x1e, 0xa9, 0xa1,
|
|
0xc7, 0xf9, 0xf8, 0xa7, 0x3f, 0x85, 0xa1, 0xa4,
|
|
};
|
|
|
|
/*
|
|
* IV method encblkno8, blkno 3.
|
|
*/
|
|
static const uint8_t aes_cbc_256_encblkno8_vec3_ctxt[SECSIZE] = {
|
|
0x83, 0x77, 0xd8, 0xa8, 0x6a, 0x36, 0x41, 0x72,
|
|
0xb6, 0x03, 0x4e, 0x5e, 0x39, 0x36, 0xe3, 0xf5,
|
|
0xd0, 0x1b, 0x0d, 0x97, 0x78, 0x46, 0xee, 0xfd,
|
|
0x34, 0x34, 0x16, 0xa0, 0x44, 0xcf, 0x0b, 0xdc,
|
|
0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|
|
.ctxt = aes_cbc_256_encblkno8_vec1_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno8_vec2_ctxt,
|
|
},
|
|
{
|
|
.blkno = 3,
|
|
.ptxt = aes_cbc_ptxt,
|
|
.ctxt = aes_cbc_256_encblkno8_vec3_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* 256 bits key from IEEE 1619/D16, NUL terminated.
|
|
*/
|
|
static const char aes_xts_256_key[33] = {
|
|
0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
|
|
0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
|
|
0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
|
|
0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
|
|
0
|
|
};
|
|
|
|
/*
|
|
* 512 bits key from IEEE 1619/D16, NUL terminated.
|
|
*/
|
|
static const char aes_xts_512_key[65] = {
|
|
0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45,
|
|
0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26,
|
|
0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69,
|
|
0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27,
|
|
0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93,
|
|
0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95,
|
|
0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37,
|
|
0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92,
|
|
0
|
|
};
|
|
|
|
/*
|
|
* Vector 4 from IEEE 1619/D16, blkno 0.
|
|
*/
|
|
static const uint8_t aes_xts_256_vec4_ptxt[SECSIZE] = {
|
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x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0x20, 0x14, 0x7b, 0xea,
|
|
0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68,
|
|
};
|
|
|
|
/*
|
|
* Vector 5 from IEEE 1619/D16, blkno 1.
|
|
*/
|
|
static const uint8_t aes_xts_256_vec5_ptxt[SECSIZE] = {
|
|
0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76,
|
|
0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2,
|
|
0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25,
|
|
0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c,
|
|
0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f,
|
|
0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00,
|
|
0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad,
|
|
0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12,
|
|
0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5,
|
|
0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5,
|
|
0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc,
|
|
0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce,
|
|
0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4,
|
|
0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84,
|
|
0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a,
|
|
0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65,
|
|
0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89,
|
|
0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0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b, 0x3e, 0x82, 0x91, 0xec,
|
|
0xa0, 0x4d, 0x66, 0x52, 0x0d, 0x22, 0x9e, 0x60,
|
|
0x40, 0x1e, 0x72, 0x82, 0xbe, 0xf4, 0x86, 0xae,
|
|
0x05, 0x9a, 0xa7, 0x06, 0x96, 0xe0, 0xe3, 0x05,
|
|
0xd7, 0x77, 0x14, 0x0a, 0x7a, 0x88, 0x3e, 0xcd,
|
|
0xcb, 0x69, 0xb9, 0xff, 0x93, 0x8e, 0x8a, 0x42,
|
|
0x31, 0x86, 0x4c, 0x69, 0xca, 0x2c, 0x20, 0x43,
|
|
0xbe, 0xd0, 0x07, 0xff, 0x3e, 0x60, 0x5e, 0x01,
|
|
0x4b, 0xcf, 0x51, 0x81, 0x38, 0xdc, 0x3a, 0x25,
|
|
0xc5, 0xe2, 0x36, 0x17, 0x1a, 0x2d, 0x01, 0xd6,
|
|
};
|
|
|
|
/*
|
|
* Vector 7 from IEEE 1619/D16, blkno 0xfd.
|
|
*/
|
|
static const uint8_t aes_xts_256_vec7_ptxt[SECSIZE] = {
|
|
0x8e, 0x41, 0xb7, 0x8c, 0x39, 0x0b, 0x5a, 0xf9,
|
|
0xd7, 0x58, 0xbb, 0x21, 0x4a, 0x67, 0xe9, 0xf6,
|
|
0xbf, 0x77, 0x27, 0xb0, 0x9a, 0xc6, 0x12, 0x40,
|
|
0x84, 0xc3, 0x76, 0x11, 0x39, 0x8f, 0xa4, 0x5d,
|
|
0xaa, 0xd9, 0x48, 0x68, 0x60, 0x0e, 0xd3, 0x91,
|
|
0xfb, 0x1a, 0xcd, 0x48, 0x57, 0xa9, 0x5b, 0x46,
|
|
0x6e, 0x62, 0xef, 0x9f, 0x4b, 0x37, 0x72, 0x44,
|
|
0xd1, 0xc1, 0x52, 0xe7, 0xb3, 0x0d, 0x73, 0x1a,
|
|
0xad, 0x30, 0xc7, 0x16, 0xd2, 0x14, 0xb7, 0x07,
|
|
0xae, 0xd9, 0x9e, 0xb5, 0xb5, 0xe5,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0xc5, 0xf2, 0x38, 0x03,
|
|
0x8a, 0x30, 0x45, 0xe6, 0xf7, 0x2e, 0x48, 0xef,
|
|
0x0f, 0xe8, 0xbc, 0x67, 0x5e, 0x82, 0xc3, 0x18,
|
|
0xa2, 0x68, 0xe4, 0x39, 0x70, 0x27, 0x1b, 0xf1,
|
|
0x19, 0xb8, 0x1b, 0xf6, 0xa9, 0x82, 0x74, 0x65,
|
|
0x54, 0xf8, 0x4e, 0x72, 0xb9, 0xf0, 0x02, 0x80,
|
|
0xa3, 0x20, 0xa0, 0x81, 0x42, 0x92, 0x3c, 0x23,
|
|
0xc8, 0x83, 0x42, 0x3f, 0xf9, 0x49, 0x82, 0x7f,
|
|
0x29, 0xbb, 0xac, 0xdc, 0x1c, 0xcd, 0xb0, 0x49,
|
|
0x38, 0xce, 0x60, 0x98, 0xc9, 0x5b, 0xa6, 0xb3,
|
|
0x25, 0x28, 0xf4, 0xef, 0x78, 0xee, 0xd7, 0x78,
|
|
0xb2, 0xe1, 0x22, 0xdd, 0xfd, 0x1c, 0xbd, 0xd1,
|
|
0x1d, 0x1c, 0x0a, 0x67, 0x83, 0xe0, 0x11, 0xfc,
|
|
0x53, 0x6d, 0x63, 0xd0, 0x53, 0x26, 0x06, 0x37,
|
|
};
|
|
|
|
/*
|
|
* Vector 8 from IEEE 1619/D16, blkno 0xfe.
|
|
*/
|
|
static const uint8_t aes_xts_256_vec8_ptxt[SECSIZE] = {
|
|
0xd5, 0x5f, 0x68, 0x4f, 0x81, 0xf4, 0x42, 0x6e,
|
|
0x9f, 0xde, 0x92, 0xa5, 0xff, 0x02, 0xdf, 0x2a,
|
|
0xc8, 0x96, 0xaf, 0x63, 0x96, 0x28, 0x88, 0xa9,
|
|
0x79, 0x10, 0xc1, 0x37, 0x9e, 0x20, 0xb0, 0xa3,
|
|
0xb1, 0xdb, 0x61, 0x3f, 0xb7, 0xfe, 0x2e, 0x07,
|
|
0x00, 0x43, 0x29, 0xea, 0x5c, 0x22, 0xbf,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, 0xc4, 0x15, 0xae, 0xbb, 0x65,
|
|
0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a,
|
|
0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca,
|
|
0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24,
|
|
0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e,
|
|
0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d,
|
|
0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05,
|
|
0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06,
|
|
0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9,
|
|
0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4,
|
|
0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11,
|
|
0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c,
|
|
0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85,
|
|
0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1,
|
|
0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11,
|
|
0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c,
|
|
0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef,
|
|
0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a,
|
|
};
|
|
|
|
/*
|
|
* Vector 9 from IEEE 1619/D16, blkno 0xff.
|
|
*/
|
|
static const uint8_t aes_xts_256_vec9_ptxt[SECSIZE] = {
|
|
0x72, 0xef, 0xc1, 0xeb, 0xfe, 0x1e, 0xe2, 0x59,
|
|
0x75, 0xa6, 0xeb, 0x3a, 0xa8, 0x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 0xbb,
|
|
0x18, 0xae, 0xce, 0x7c, 0x5c, 0x44, 0x69, 0x32,
|
|
0x60, 0xaa, 0xb3, 0x86, 0xc0, 0xa3, 0x7b, 0x11,
|
|
0xb1, 0x14, 0xf1, 0xc4, 0x15, 0xae, 0xbb, 0x65,
|
|
0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a,
|
|
0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca,
|
|
0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24,
|
|
0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e,
|
|
0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d,
|
|
0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05,
|
|
0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06,
|
|
0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9,
|
|
0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4,
|
|
0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11,
|
|
0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c,
|
|
0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85,
|
|
0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1,
|
|
0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11,
|
|
0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c,
|
|
0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef,
|
|
0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a,
|
|
};
|
|
|
|
static const uint8_t aes_xts_256_vec9_ctxt[SECSIZE] = {
|
|
0x32, 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x44, 0x0e, 0xc7, 0xf1, 0x04, 0x45, 0xcd,
|
|
};
|
|
|
|
const struct testvec aes_xts_256_vectors[] = {
|
|
{
|
|
.blkno = 0,
|
|
.ptxt = aes_xts_256_vec4_ptxt,
|
|
.ctxt = aes_xts_256_vec4_ctxt,
|
|
},
|
|
{
|
|
.blkno = 1,
|
|
.ptxt = aes_xts_256_vec5_ptxt,
|
|
.ctxt = aes_xts_256_vec5_ctxt,
|
|
},
|
|
{
|
|
.blkno = 2,
|
|
.ptxt = aes_xts_256_vec6_ptxt,
|
|
.ctxt = aes_xts_256_vec6_ctxt,
|
|
},
|
|
{
|
|
.blkno = 0xfd,
|
|
.ptxt = aes_xts_256_vec7_ptxt,
|
|
.ctxt = aes_xts_256_vec7_ctxt,
|
|
},
|
|
{
|
|
.blkno = 0xfe,
|
|
.ptxt = aes_xts_256_vec8_ptxt,
|
|
.ctxt = aes_xts_256_vec8_ctxt,
|
|
},
|
|
{
|
|
.blkno = 0xff,
|
|
.ptxt = aes_xts_256_vec9_ptxt,
|
|
.ctxt = aes_xts_256_vec9_ctxt,
|
|
},
|
|
};
|
|
|
|
/*
|
|
* Vector 10 from IEEE 1619/D16, blkno 0xff.
|
|
*/
|
|
static const uint8_t aes_xts_512_vec10_ptxt[SECSIZE] = {
|
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
|
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
|
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
|
|
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
|
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
|
|
0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d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0x4a, 0xff, 0x04,
|
|
0x79, 0xda, 0x9a, 0x41, 0x0e, 0x44, 0x50, 0xe0,
|
|
0xdd, 0x7a, 0xe4, 0xc6, 0xe2, 0x91, 0x09, 0x00,
|
|
0x57, 0x5d, 0xa4, 0x01, 0xfc, 0x07, 0x05, 0x9f,
|
|
0x64, 0x5e, 0x8b, 0x7e, 0x9b, 0xfd, 0xef, 0x33,
|
|
0x94, 0x30, 0x54, 0xff, 0x84, 0x01, 0x14, 0x93,
|
|
0xc2, 0x7b, 0x34, 0x29, 0xea, 0xed, 0xb4, 0xed,
|
|
0x53, 0x76, 0x44, 0x1a, 0x77, 0xed, 0x43, 0x85,
|
|
0x1a, 0xd7, 0x7f, 0x16, 0xf5, 0x41, 0xdf, 0xd2,
|
|
0x69, 0xd5, 0x0d, 0x6a, 0x5f, 0x14, 0xfb, 0x0a,
|
|
0xab, 0x1c, 0xbb, 0x4c, 0x15, 0x50, 0xbe, 0x97,
|
|
0xf7, 0xab, 0x40, 0x66, 0x19, 0x3c, 0x4c, 0xaa,
|
|
0x77, 0x3d, 0xad, 0x38, 0x01, 0x4b, 0xd2, 0x09,
|
|
0x2f, 0xa7, 0x55, 0xc8, 0x24, 0xbb, 0x5e, 0x54,
|
|
0xc4, 0xf3, 0x6f, 0xfd, 0xa9, 0xfc, 0xea, 0x70,
|
|
0xb9, 0xc6, 0xe6, 0x93, 0xe1, 0x48, 0xc1, 0x51,
|
|
};
|
|
|
|
/*
|
|
* Vector 11 from IEEE 1619/D16, blkno 0xffff.
|
|
*/
|
|
static const uint8_t aes_xts_512_vec11_ptxt[SECSIZE] = {
|
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
|
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
|
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
|
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
|
0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0x61,
|
|
0x8e, 0x02, 0x44, 0xc9, 0xac, 0x0d, 0x3c, 0x66,
|
|
0xfb, 0x51, 0x59, 0x8c, 0xd2, 0xdb, 0x11, 0xf9,
|
|
0xbe, 0x39, 0x79, 0x1a, 0xbe, 0x44, 0x7c, 0x63,
|
|
0x09, 0x4f, 0x7c, 0x45, 0x3b, 0x7f, 0xf8, 0x7c,
|
|
0xb5, 0xbb, 0x36, 0xb7, 0xc7, 0x9e, 0xfb, 0x08,
|
|
0x72, 0xd1, 0x70, 0x58, 0xb8, 0x3b, 0x15, 0xab,
|
|
0x08, 0x66, 0xad, 0x8a, 0x58, 0x65, 0x6c, 0x5a,
|
|
0x7e, 0x20, 0xdb, 0xdf, 0x30, 0x8b, 0x24, 0x61,
|
|
0xd9, 0x7c, 0x0e, 0xc0, 0x02, 0x4a, 0x27, 0x15,
|
|
0x05, 0x52, 0x49, 0xcf, 0x3b, 0x47, 0x8d, 0xdd,
|
|
0x47, 0x40, 0xde, 0x65, 0x4f, 0x75, 0xca, 0x68,
|
|
0x6e, 0x0d, 0x73, 0x45, 0xc6, 0x9e, 0xd5, 0x0c,
|
|
0xdc, 0x2a, 0x8b, 0x33, 0x2b, 0x1f, 0x88, 0x24,
|
|
0x10, 0x8a, 0xc9, 0x37, 0xeb, 0x05, 0x05, 0x85,
|
|
0x60, 0x8e, 0xe7, 0x34, 0x09, 0x7f, 0xc0, 0x90,
|
|
0x54, 0xfb, 0xff, 0x89, 0xee, 0xae, 0xea, 0x79,
|
|
0x1f, 0x4a, 0x7a, 0xb1, 0xf9, 0x86, 0x82, 0x94,
|
|
0xa4, 0xf9, 0xe2, 0x7b, 0x42, 0xaf, 0x81, 0x00,
|
|
0xcb, 0x9d, 0x59, 0xce, 0xf9, 0x64, 0x58, 0x03,
|
|
};
|
|
|
|
const struct testvec aes_xts_512_vectors[] = {
|
|
{
|
|
.blkno = 0xff,
|
|
.ptxt = aes_xts_512_vec10_ptxt,
|
|
.ctxt = aes_xts_512_vec10_ctxt,
|
|
},
|
|
{
|
|
.blkno = 0xffff,
|
|
.ptxt = aes_xts_512_vec11_ptxt,
|
|
.ctxt = aes_xts_512_vec11_ctxt,
|
|
},
|
|
};
|
|
|
|
static int
|
|
open_disk(const char *devpath, const char *imgpath, size_t size)
|
|
{
|
|
int fd;
|
|
|
|
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
|
|
if (fd < 0)
|
|
return -1;
|
|
|
|
if (ftruncate(fd, size) < 0)
|
|
goto fail;
|
|
|
|
if (rump_pub_etfs_register_withsize(devpath,
|
|
imgpath, RUMP_ETFS_BLK, 0, size) < 0) {
|
|
goto fail;
|
|
}
|
|
|
|
unlink(imgpath);
|
|
return fd;
|
|
fail:
|
|
close(fd);
|
|
unlink(imgpath);
|
|
return -1;
|
|
}
|
|
|
|
static int
|
|
open_cgd(int devno)
|
|
{
|
|
char devpath[32];
|
|
|
|
sprintf(devpath, "/dev/rcgd%d%c", devno, getrawpartition() + 'a');
|
|
|
|
return rump_sys_open(devpath, O_RDWR, 0);
|
|
}
|
|
|
|
static int
|
|
configure_cgd(int fd, const char *dkpath, const char *alg,
|
|
const char *ivmethod, const char *key, size_t keylen)
|
|
{
|
|
struct cgd_ioctl ci;
|
|
|
|
memset(&ci, 0, sizeof(ci));
|
|
ci.ci_disk = dkpath;
|
|
ci.ci_alg = alg;
|
|
ci.ci_ivmethod = ivmethod;
|
|
ci.ci_keylen = 8 * keylen - 8; /* Exclude the NUL terminator. */
|
|
ci.ci_key = key;
|
|
ci.ci_blocksize = 128;
|
|
|
|
return rump_sys_ioctl(fd, CGDIOCSET, &ci);
|
|
}
|
|
|
|
static int
|
|
unconfigure_cgd(int fd)
|
|
{
|
|
struct cgd_ioctl ci;
|
|
|
|
return rump_sys_ioctl(fd, CGDIOCCLR, &ci);
|
|
}
|
|
|
|
static int
|
|
write_testvec(int cgdfd, const struct testvec *tv)
|
|
{
|
|
ssize_t written;
|
|
|
|
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
|
|
return -1;
|
|
|
|
written = rump_sys_write(cgdfd, tv->ptxt, SECSIZE);
|
|
if (written < 0)
|
|
return -1;
|
|
if (written != SECSIZE) {
|
|
errno = EDOM; /* Something distinct. */
|
|
return -1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
static int
|
|
read_testvec(int cgdfd, const struct testvec *tv)
|
|
{
|
|
char *buf;
|
|
int res = -1;
|
|
|
|
buf = malloc(SECSIZE);
|
|
if (buf == NULL)
|
|
return -1;
|
|
|
|
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
|
|
goto fail;
|
|
|
|
if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE)
|
|
goto fail;
|
|
|
|
res = memcmp(buf, tv->ptxt, SECSIZE);
|
|
fail:
|
|
free(buf);
|
|
return res;
|
|
}
|
|
|
|
static int
|
|
check_testvec(int dkfd, const struct testvec *tv)
|
|
{
|
|
char *buf;
|
|
int res = -1;
|
|
|
|
buf = malloc(SECSIZE);
|
|
if (buf == NULL)
|
|
return -1;
|
|
|
|
if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
|
|
goto fail;
|
|
|
|
if (read(dkfd, buf, SECSIZE) != SECSIZE)
|
|
goto fail;
|
|
|
|
res = memcmp(buf, tv->ctxt, SECSIZE);
|
|
fail:
|
|
free(buf);
|
|
return res;
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_128_encblkno1);
|
|
ATF_TC_HEAD(cgd_aes_cbc_128_encblkno1, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 128 bits key, ivmethod encblkno1");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_128_encblkno1, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-128-encblkno1.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_128_key, sizeof(aes_cbc_128_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_128_key, sizeof(aes_cbc_128_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_128_encblkno8);
|
|
ATF_TC_HEAD(cgd_aes_cbc_128_encblkno8, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 128 bits key, ivmethod encblkno8");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_128_encblkno8, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-128-encblkno8.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_128_key, sizeof(aes_cbc_128_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_128_key, sizeof(aes_cbc_128_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_192_encblkno1);
|
|
ATF_TC_HEAD(cgd_aes_cbc_192_encblkno1, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 192 bits key, ivmethod encblkno1");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_192_encblkno1, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-192-encblkno1.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_192_key, sizeof(aes_cbc_192_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_192_key, sizeof(aes_cbc_192_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_192_encblkno8);
|
|
ATF_TC_HEAD(cgd_aes_cbc_192_encblkno8, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 192 bits key, ivmethod encblkno8");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_192_encblkno8, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-192-encblkno8.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_192_key, sizeof(aes_cbc_192_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_192_key, sizeof(aes_cbc_192_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_256_encblkno1);
|
|
ATF_TC_HEAD(cgd_aes_cbc_256_encblkno1, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 256 bits key, ivmethod encblkno1");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_256_encblkno1, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-256-encblkno1.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_256_key, sizeof(aes_cbc_256_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1",
|
|
aes_cbc_256_key, sizeof(aes_cbc_256_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_cbc_256_encblkno8);
|
|
ATF_TC_HEAD(cgd_aes_cbc_256_encblkno8, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr",
|
|
"Test aes-cbc with 256 bits key, ivmethod encblkno8");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_cbc_256_encblkno8, tc)
|
|
{
|
|
const char imgpath[] = "aes-cbc-256-encblkno8.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_256_key, sizeof(aes_cbc_256_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[3]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8",
|
|
aes_cbc_256_key, sizeof(aes_cbc_256_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[3]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[3]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_xts_256);
|
|
ATF_TC_HEAD(cgd_aes_xts_256, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr", "Test aes-xts with 256 bits key");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_xts_256, tc)
|
|
{
|
|
const char imgpath[] = "aes-xts-256.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 256 * SECSIZE; /* Last blkno is 0xff. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1",
|
|
aes_xts_256_key, sizeof(aes_xts_256_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[1]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[2]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[3]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[4]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[5]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1",
|
|
aes_xts_256_key, sizeof(aes_xts_256_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[1]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[2]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[3]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[4]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[5]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[1]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[2]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[3]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[4]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[5]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TC(cgd_aes_xts_512);
|
|
ATF_TC_HEAD(cgd_aes_xts_512, tc)
|
|
{
|
|
atf_tc_set_md_var(tc, "descr", "Test aes-xts with 512 bits key");
|
|
}
|
|
|
|
ATF_TC_BODY(cgd_aes_xts_512, tc)
|
|
{
|
|
const char imgpath[] = "aes-xts-512.img";
|
|
const char *dkpath = "/dev/dk";
|
|
const size_t dksize = 65536 * SECSIZE; /* Last blkno is 0xffff. */
|
|
int dkfd, cgdfd;
|
|
|
|
rump_init();
|
|
|
|
RL(dkfd = open_disk(dkpath, imgpath, dksize));
|
|
|
|
RL(cgdfd = open_cgd(0));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1",
|
|
aes_xts_512_key, sizeof(aes_xts_512_key)));
|
|
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_512_vectors[0]), -1);
|
|
CHECK_LIBC(write_testvec(cgdfd, &aes_xts_512_vectors[1]), -1);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1",
|
|
aes_xts_512_key, sizeof(aes_xts_512_key)));
|
|
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_512_vectors[0]), 0);
|
|
ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_512_vectors[1]), 0);
|
|
|
|
RL(unconfigure_cgd(cgdfd));
|
|
RL(rump_sys_close(cgdfd));
|
|
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_512_vectors[0]), 0);
|
|
ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_512_vectors[1]), 0);
|
|
|
|
RL(close(dkfd));
|
|
}
|
|
|
|
ATF_TP_ADD_TCS(tp)
|
|
{
|
|
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_128_encblkno1);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_128_encblkno8);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_192_encblkno1);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_192_encblkno8);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_256_encblkno1);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_cbc_256_encblkno8);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_xts_256);
|
|
ATF_TP_ADD_TC(tp, cgd_aes_xts_512);
|
|
|
|
return atf_no_error();
|
|
}
|