예제 #1
0
/* Run the self-tests for CAMELLIA-CTR-128, tests IV increment of bulk CTR
   encryption.  Returns NULL on success. */
static const char*
selftest_ctr_128 (void)
{
  const int nblocks = 32+16+1;
  const int blocksize = CAMELLIA_BLOCK_SIZE;
  const int context_size = sizeof(CAMELLIA_context);

  return _gcry_selftest_helper_ctr("CAMELLIA", &camellia_setkey,
           &camellia_encrypt, &_gcry_camellia_ctr_enc, nblocks, blocksize,
	   context_size);
}
예제 #2
0
/* Run the self-tests for BLOWFISH-CTR, tests IV increment of bulk CTR
   encryption.  Returns NULL on success. */
static const char *
selftest_ctr (void)
{
  const int nblocks = 4+1;
  const int blocksize = BLOWFISH_BLOCKSIZE;
  const int context_size = sizeof(BLOWFISH_context);

  return _gcry_selftest_helper_ctr("BLOWFISH", &bf_setkey,
           &encrypt_block, &_gcry_blowfish_ctr_enc, nblocks, blocksize,
	   context_size);
}
예제 #3
0
/* Run the self-tests for SERPENT-CTR-128, tests IV increment of bulk CTR
   encryption.  Returns NULL on success. */
static const char*
selftest_ctr_128 (void)
{
  const int nblocks = 16+8+1;
  const int blocksize = sizeof(serpent_block_t);
  const int context_size = sizeof(serpent_context_t);

  return _gcry_selftest_helper_ctr("SERPENT", &serpent_setkey,
           &serpent_encrypt, &_gcry_serpent_ctr_enc, nblocks, blocksize,
	   context_size);
}