SECSIZE
for (i = 0; i < sizeof buf; i += SECSIZE) {
adiantum_enc(buf + i, buf + i, SECSIZE, blkno, 16, &C);
if (le64dec(blkno) == 1024*1024*1024/SECSIZE)
static const uint8_t c3des_cbc_192_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_192_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t c3des_cbc_ptxt[SECSIZE] __aligned(4) =
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (rump_sys_write(cgdfd, tv->ptxt, SECSIZE) != SECSIZE)
buf = malloc(SECSIZE);
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ptxt, SECSIZE);
buf = malloc(SECSIZE);
if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (read(dkfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ctxt, SECSIZE);
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
static const uint8_t c3des_cbc_192_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_128_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_128_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_256_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec4_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_xts_256_vec4_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec5_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_xts_256_vec5_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec6_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_xts_256_vec6_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec7_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_xts_256_vec7_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec8_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_cbc_128_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec8_ctxt[SECSIZE] = {
static const uint8_t aes_xts_256_vec9_ptxt[SECSIZE] __aligned(4) = {
static const uint8_t aes_xts_256_vec9_ctxt[SECSIZE] = {
static const uint8_t aes_xts_512_vec10_ptxt[SECSIZE] = {
static const uint8_t aes_xts_512_vec10_ctxt[SECSIZE] = {
static const uint8_t aes_xts_512_vec11_ptxt[SECSIZE] = {
static const uint8_t aes_xts_512_vec11_ctxt[SECSIZE] = {
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
written = rump_sys_write(cgdfd, tv->ptxt, SECSIZE);
if (written != SECSIZE) {
buf = malloc(SECSIZE);
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ptxt, SECSIZE);
buf = malloc(SECSIZE);
if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (read(dkfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ctxt, SECSIZE);
static const uint8_t aes_cbc_128_encblkno1_vec3_ctxt[SECSIZE] = {
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 256 * SECSIZE; /* Last blkno is 0xff. */
const size_t dksize = 65536 * SECSIZE; /* Last blkno is 0xffff. */
static const uint8_t aes_cbc_128_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_128_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_128_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_128_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_192_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t aes_cbc_ptxt[SECSIZE] __aligned(4) =
static const uint8_t aes_cbc_192_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_448_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno1_vec1_ctxt[SECSIZE] = {
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (rump_sys_write(cgdfd, tv->ptxt, SECSIZE) != SECSIZE)
buf = malloc(SECSIZE);
if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ptxt, SECSIZE);
buf = malloc(SECSIZE);
if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0)
if (read(dkfd, buf, SECSIZE) != SECSIZE)
res = memcmp(buf, tv->ctxt, SECSIZE);
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */
static const uint8_t bf_cbc_128_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno8_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno8_vec1_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno8_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_128_encblkno8_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno1_vec0_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno1_vec1_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno1_vec2_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_256_encblkno1_vec3_ctxt[SECSIZE] = {
static const uint8_t bf_cbc_ptxt[SECSIZE] __aligned(4) =