Functions
cipher_test.cc File Reference
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include <openssl/aes.h>
#include <openssl/cipher.h>
#include <openssl/err.h>
#include <openssl/nid.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include <openssl/span.h>
#include "../test/file_test.h"
#include "../test/test_util.h"
#include "../test/wycheproof_util.h"
#include "./internal.h"
Include dependency graph for cipher_test.cc:

Go to the source code of this file.

Functions

static bool DoCipher (EVP_CIPHER_CTX *ctx, std::vector< uint8_t > *out, bssl::Span< const uint8_t > in, size_t chunk, bool in_place)
 
static const EVP_CIPHERGetCipher (const std::string &name)
 
 TEST (CipherTest, CAVP_AES_128_CBC)
 
 TEST (CipherTest, CAVP_AES_128_CTR)
 
 TEST (CipherTest, CAVP_AES_192_CBC)
 
 TEST (CipherTest, CAVP_AES_192_CTR)
 
 TEST (CipherTest, CAVP_AES_256_CBC)
 
 TEST (CipherTest, CAVP_AES_256_CTR)
 
 TEST (CipherTest, CAVP_TDES_CBC)
 
 TEST (CipherTest, CAVP_TDES_ECB)
 
 TEST (CipherTest, GetCipher)
 
 TEST (CipherTest, SHA1WithSecretSuffix)
 
 TEST (CipherTest, TestVectors)
 
 TEST (CipherTest, WycheproofAESCBC)
 
static void TestCipher (FileTest *t)
 
static void TestOperation (FileTest *t, const EVP_CIPHER *cipher, bool encrypt, bool copy, bool in_place, size_t chunk_size, const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv, const std::vector< uint8_t > &plaintext, const std::vector< uint8_t > &ciphertext, const std::vector< uint8_t > &aad, const std::vector< uint8_t > &tag)
 

Function Documentation

◆ DoCipher()

static bool DoCipher ( EVP_CIPHER_CTX ctx,
std::vector< uint8_t > *  out,
bssl::Span< const uint8_t in,
size_t  chunk,
bool  in_place 
)
static

Definition at line 125 of file cipher_test.cc.

◆ GetCipher()

static const EVP_CIPHER* GetCipher ( const std::string &  name)
static

Definition at line 78 of file cipher_test.cc.

◆ TEST() [1/12]

TEST ( CipherTest  ,
CAVP_AES_128_CBC   
)

Definition at line 381 of file cipher_test.cc.

◆ TEST() [2/12]

TEST ( CipherTest  ,
CAVP_AES_128_CTR   
)

Definition at line 386 of file cipher_test.cc.

◆ TEST() [3/12]

TEST ( CipherTest  ,
CAVP_AES_192_CBC   
)

Definition at line 391 of file cipher_test.cc.

◆ TEST() [4/12]

TEST ( CipherTest  ,
CAVP_AES_192_CTR   
)

Definition at line 396 of file cipher_test.cc.

◆ TEST() [5/12]

TEST ( CipherTest  ,
CAVP_AES_256_CBC   
)

Definition at line 401 of file cipher_test.cc.

◆ TEST() [6/12]

TEST ( CipherTest  ,
CAVP_AES_256_CTR   
)

Definition at line 406 of file cipher_test.cc.

◆ TEST() [7/12]

TEST ( CipherTest  ,
CAVP_TDES_CBC   
)

Definition at line 411 of file cipher_test.cc.

◆ TEST() [8/12]

TEST ( CipherTest  ,
CAVP_TDES_ECB   
)

Definition at line 415 of file cipher_test.cc.

◆ TEST() [9/12]

TEST ( CipherTest  ,
GetCipher   
)

Definition at line 528 of file cipher_test.cc.

◆ TEST() [10/12]

TEST ( CipherTest  ,
SHA1WithSecretSuffix   
)

Definition at line 481 of file cipher_test.cc.

◆ TEST() [11/12]

TEST ( CipherTest  ,
TestVectors   
)

Definition at line 377 of file cipher_test.cc.

◆ TEST() [12/12]

TEST ( CipherTest  ,
WycheproofAESCBC   
)

Definition at line 419 of file cipher_test.cc.

◆ TestCipher()

static void TestCipher ( FileTest t)
static

Definition at line 316 of file cipher_test.cc.

◆ TestOperation()

static void TestOperation ( FileTest t,
const EVP_CIPHER cipher,
bool  encrypt,
bool  copy,
bool  in_place,
size_t  chunk_size,
const std::vector< uint8_t > &  key,
const std::vector< uint8_t > &  iv,
const std::vector< uint8_t > &  plaintext,
const std::vector< uint8_t > &  ciphertext,
const std::vector< uint8_t > &  aad,
const std::vector< uint8_t > &  tag 
)
static

Definition at line 162 of file cipher_test.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:06