OpenSSL 에서 제공하는 난수발생기 CTR-DRBG의 인스턴스를 생성하는 함수

RAND_DRBG *RAND_DRBG_new(int type, unsigned int flags, RAND_DRBG *parent);

OpenSSL의 CTR-DRBG 는 AES를 기반으로 구현되므로 첫번째 매개변수 int type 키 크기와 같이 128, 192, 256 비트의 AES로 나뉜다.

 

Currently, all DRBG types are based on AES-CTR, so  type can be one of the following values: NID_aes_128_ctr, NID_aes_192_ctr, NID_aes_256_ctr. Before the DRBG can be used to generate random bits, it is necessary to set its type and to instantiate it.

출처 : https://www.openssl.org/docs/man1.1.1/man3/RAND_DRBG_new.html

 

/docs/man1.1.1/man3/RAND_DRBG_new.html

NAME RAND_DRBG_new, RAND_DRBG_secure_new, RAND_DRBG_set, RAND_DRBG_set_defaults, RAND_DRBG_instantiate, RAND_DRBG_uninstantiate, RAND_DRBG_free - initialize and cleanup a RAND_DRBG instance SYNOPSIS #include RAND_DRBG *RAND_DRBG_new(int type, unsigned int

www.openssl.org

 

예를 들어 NID_aes_128_ctr 은 904로 정의되어 있는데 단순한 넘버링인 듯 하다.

 

NID_aes_128_ctr

 

'Linux' 카테고리의 다른 글

Equivalent to getch() in Linux  (1) 2022.12.21
bad interpreter  (1) 2022.11.21
Install library ncurses  (0) 2022.11.18
Install OpenSSL 1.1.1s in Ubuntu 22.04.1  (2) 2022.11.12
Setup ssh on Ubuntu 20.04.4 LTS  (0) 2022.10.04

+ Recent posts