WA-SDK
3.0.4.0
WA-SDK
|
대칭키 암호화,복호화 (일반 또는 PKCS #7 EnvelopedData) 더 자세히 ...
데이터 구조 | |
struct | SECONTEXT |
대칭키 암호화 컨텍스트 더 자세히 ... | |
열거형 타입 | |
enum | ISSACAPI_SE_MODES { ISSACAPI_SE_ECB_MODE = 1 , ISSACAPI_SE_CBC_MODE , ISSACAPI_SE_CFB_MODE , ISSACAPI_SE_CFB_BYTE_MODE , ISSACAPI_SE_OFB_MODE , ISSACAPI_SE_OFB_BYTE_MODE , ISSACAPI_SE_CTS_MODE , ISSACAPI_SE_CFB1_MODE , ISSACAPI_SE_CTR_MODE , ISSACAPI_SE_MCFB_MODE , ISSACAPI_SE_GCM_MODE , ISSACAPI_SE_CCM_MODE } |
대칭키 암호 블록 운용모드 더 자세히 ... | |
함수 | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SECONTEXT_Create (SECONTEXT *secontext) |
SECONTEXT 구조체를 초기화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SECONTEXT_Delete (SECONTEXT *secontext) |
SECONTEXT 에 할당된 메모리를 해제한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SECONTEXT_Set (SECONTEXT *secontext, const void *key, int key_len, const void *iv, int iv_len, int mode, int cipher_id) |
SECONTEXT 에 암호화를 위한 정보들을 입력한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SECONTEXT_Copy (SECONTEXT *destination_secontext, SECONTEXT *source_secontext) |
SECONTEXT 를 복사한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Encrypt (void *ciphertext, int *ciphertext_len, int ciphertext_alloc_len, void *plaintext, int plaintext_len, SECONTEXT *secontext) |
평문을 암호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_EncryptEx (void *ciphertext, int *ciphertext_len, int ciphertext_alloc_len, void *plaintext, int plaintext_len, SECONTEXT *secontext, int pad_type) |
평문을 암호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Decrypt (void *plaintext, int *plaintext_len, int plaintext_alloc_len, void *ciphertext, int ciphertext_len, SECONTEXT *secontext) |
암호문을 복호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_DecryptEx (void *plaintext, int *plaintext_len, int plaintext_alloc_len, void *ciphertext, int ciphertext_len, SECONTEXT *secontext, int pad_type) |
암호문을 복호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Encrypt_File (const char *ciphertext_file, const char *plaintext_file, SECONTEXT *secontext) |
입력한 파일을 암호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Decrypt_File (const char *plaintext_file, const char *ciphertext_file, SECONTEXT *secontext) |
입력한 파일을 복호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Encrypt_File_BSize (const char *ciphertext_file, const char *plaintext_file, SECONTEXT *secontext, int buffer_size) |
입력한 파일을 암호화한다. (입력한 버퍼크기 사용) 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Decrypt_File_BSize (const char *plaintext_file, const char *ciphertext_file, SECONTEXT *secontext, int buffer_size) |
입력한 파일을 복호화한다. (입력한 버퍼크기 사용) 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Encrypt_Auth (void *ciphertext, int *ciphertext_len, int ciphertext_alloc_len, void *plaintext, int plaintext_len, void *authdata, int authdata_len, void *iv, int iv_len, int tag_len, SECONTEXT *secontext) |
입력한 원문을 CCM/GCM 방식으로 암호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Decrypt_Auth (void *plaintext, int *plaintext_len, int plaintext_alloc_len, void *ciphertext, int ciphertext_len, void *authdata, int authdata_len, void *iv, int iv_len, int tag_len, SECONTEXT *secontext) |
입력한 암호문을 CCM/GCM 방식으로 복호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Encrypt_CMS (void *ciphertext, int *ciphertext_len, int ciphertext_alloc_len, void *plaintext, int plaintext_len, SECONTEXT *secontext) |
PKCS #7 - EnvelopedData 메시지 형식으로 암호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_Decrypt_CMS (void *plaintext, int *plaintext_len, int plaintext_alloc_len, void *ciphertext, int ciphertext_len, SECONTEXT *secontext) |
PKCS #7 - EnvelopedData 메시지 형식의 암호문을 복호화한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_GetRandom (void *buf, int buflen) |
랜덤값을 생성한다. 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_PBKDF_PKCS12_GetKey (void *keyOut, int keyLen, const char *passwd) |
입력된 PIN을 기반으로 암복호화용 키를 생성(유도)한다. (PKCS#12 v1.0 Appendix. B) 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_PBKDF_PKCS12_GetKey_Advanced (void *keyOut, int keyLen, int idByte, const char *passwd, const char *salt, int saltLen, int iterations, int hashType) |
입력된 값들을 기반으로 키를 생성(유도)한다. (PKCS#12 v1.0 Appendix. B) 더 자세히 ... | |
WA_SDK_API ISSAC_RETURN FUNCCALL | ISSAC_SE_PBKDF2_GetKey (void *keyOut, int keyLen, const char *passwd, const char *salt, int saltLen, int iterations, int hashType) |
입력된 값들을 기반으로 키를 생성(유도)한다. (PKCS#5 - PBKDF2) 더 자세히 ... | |
대칭키 암호화,복호화 (일반 또는 PKCS #7 EnvelopedData)
enum ISSACAPI_SE_MODES |
대칭키 암호 블록 운용모드
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SECONTEXT_Create | ( | SECONTEXT * | secontext | ) |
SECONTEXT 구조체를 초기화한다.
secontext | [IN,OUT] 초기화 할 SECONTEXT |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SECONTEXT_Delete | ( | SECONTEXT * | secontext | ) |
SECONTEXT 에 할당된 메모리를 해제한다.
secontext | [IN,OUT] ISSAC_SECONTEXT_Create() 를 호출하여 초기화 된 SECONTEXT |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SECONTEXT_Set | ( | SECONTEXT * | secontext, |
const void * | key, | ||
int | key_len, | ||
const void * | iv, | ||
int | iv_len, | ||
int | mode, | ||
int | cipher_id | ||
) |
SECONTEXT 에 암호화를 위한 정보들을 입력한다.
secontext | [IN,OUT] ISSAC_SECONTEXT_Create() 를 호출하여 초기화 된 SECONTEXT |
key | [IN] 비밀키 |
key_len | [IN] 비밀키 길이 |
iv | [IN] IV (Initial Vector) |
iv_len | [IN] IV 길이 |
mode | [IN] 블록 운영 모드 |
cipher_id | [IN] 대칭키 암호 알고리즘 [ISSACAPI_SEED, ISSACAPI_AES128, ISSACAPI_AES256, ISSACAPI_ARIA] |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SECONTEXT_Copy | ( | SECONTEXT * | destination_secontext, |
SECONTEXT * | source_secontext | ||
) |
SECONTEXT 를 복사한다.
destination_secontext | [IN,OUT] ISSAC_SECONTEXT_Create() 를 호출하여 초기화 된 SECONTEXT |
source_secontext | [IN] 복사할 원본 SECONTEXT |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Encrypt | ( | void * | ciphertext, |
int * | ciphertext_len, | ||
int | ciphertext_alloc_len, | ||
void * | plaintext, | ||
int | plaintext_len, | ||
SECONTEXT * | secontext | ||
) |
평문을 암호화한다.
ciphertext | [OUT] 암호문 버퍼 |
ciphertext_len | [OUT] 실제 암호문 크기 |
ciphertext_alloc_len | [IN] 암호문 버퍼의 크기 |
plaintext | [IN] 암호화 대상 원문 |
plaintext_len | [IN] 암호화 대상 원문의 크기 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_EncryptEx | ( | void * | ciphertext, |
int * | ciphertext_len, | ||
int | ciphertext_alloc_len, | ||
void * | plaintext, | ||
int | plaintext_len, | ||
SECONTEXT * | secontext, | ||
int | pad_type | ||
) |
평문을 암호화한다.
ciphertext | [OUT] 암호문 버퍼 |
ciphertext_len | [OUT] 실제 암호문 크기 |
ciphertext_alloc_len | [IN] 암호문 버퍼의 크기 |
plaintext | [IN] 암호화 대상 원문 |
plaintext_len | [IN] 암호화 대상 원문의 크기 |
secontext | [IN] SE 컨텍스트 |
pad_type | [IN] 패딩 타입 [0: 없음, 1: PKCS5 and PKCS7 패딩, 2: X9.23 패딩] |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Decrypt | ( | void * | plaintext, |
int * | plaintext_len, | ||
int | plaintext_alloc_len, | ||
void * | ciphertext, | ||
int | ciphertext_len, | ||
SECONTEXT * | secontext | ||
) |
암호문을 복호화한다.
plaintext | [OUT] 복호화 된 원문 버퍼 |
plaintext_len | [OUT] 실제 복호화 된 원문 크기 |
plaintext_alloc_len | [IN] 복호화 된 원문 버퍼의 크기 |
ciphertext | [IN] 암호문 |
ciphertext_len | [IN] 암호문 크기 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_DecryptEx | ( | void * | plaintext, |
int * | plaintext_len, | ||
int | plaintext_alloc_len, | ||
void * | ciphertext, | ||
int | ciphertext_len, | ||
SECONTEXT * | secontext, | ||
int | pad_type | ||
) |
암호문을 복호화한다.
plaintext | [OUT] 복호화 된 원문 버퍼 |
plaintext_len | [OUT] 실제 복호화 된 원문 크기 |
plaintext_alloc_len | [IN] 복호화 된 원문 버퍼의 크기 |
ciphertext | [IN] 암호문 |
ciphertext_len | [IN] 암호문 크기 |
secontext | [IN] SE 컨텍스트 |
pad_type | [IN] 패딩 타입 [0: 없음, 1: PKCS5 and PKCS7 패딩, 2: X9.23 패딩, 3: Zero 패딩] |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Encrypt_File | ( | const char * | ciphertext_file, |
const char * | plaintext_file, | ||
SECONTEXT * | secontext | ||
) |
입력한 파일을 암호화한다.
ciphertext_file | [IN] 암호문 파일의 경로 |
plaintext_file | [IN] 평문 파일의 경로 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Decrypt_File | ( | const char * | plaintext_file, |
const char * | ciphertext_file, | ||
SECONTEXT * | secontext | ||
) |
입력한 파일을 복호화한다.
plaintext_file | [IN] 복호화 된 원문 파일의 경로 |
ciphertext_file | [IN] 암호문 파일의 경로 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Encrypt_File_BSize | ( | const char * | ciphertext_file, |
const char * | plaintext_file, | ||
SECONTEXT * | secontext, | ||
int | buffer_size | ||
) |
입력한 파일을 암호화한다. (입력한 버퍼크기 사용)
ciphertext_file | [IN] 암호문 파일의 경로 |
plaintext_file | [IN] 평문 파일의 경로 |
secontext | [IN] SE 컨텍스트 |
buffer_size | [IN] 내부에서 사용할 버퍼의 크기 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Decrypt_File_BSize | ( | const char * | plaintext_file, |
const char * | ciphertext_file, | ||
SECONTEXT * | secontext, | ||
int | buffer_size | ||
) |
입력한 파일을 복호화한다. (입력한 버퍼크기 사용)
plaintext_file | [IN] 복호화 된 원문 파일의 경로 |
ciphertext_file | [IN] 암호문 파일의 경로 |
secontext | [IN] SE 컨텍스트 |
buffer_size | [IN] 내부에서 사용할 버퍼의 크기 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Encrypt_Auth | ( | void * | ciphertext, |
int * | ciphertext_len, | ||
int | ciphertext_alloc_len, | ||
void * | plaintext, | ||
int | plaintext_len, | ||
void * | authdata, | ||
int | authdata_len, | ||
void * | iv, | ||
int | iv_len, | ||
int | tag_len, | ||
SECONTEXT * | secontext | ||
) |
입력한 원문을 CCM/GCM 방식으로 암호화한다.
ciphertext | [OUT] 암호문 버퍼 |
ciphertext_len | [OUT] 실제 암호문의 크기 |
ciphertext_alloc_len | [IN] 암호문 버퍼 크기 |
plaintext | [IN] 암호화 대상 원문 |
plaintext_len | [IN] 암호화 대상 원문의 크기 |
authdata | [IN] CCM/GCM의 추가 데이터 |
authdata_len | [IN] CCM/GCM의 추가 데이터의 길이 |
iv | [IN] GCM의 iv, CCM의 nonce |
iv_len | [IN] GCM의 iv, CCM의 nonce의 길이 [CCM : 7 ≤ nonceLen ≤ 13, GCM : 12 ≤ ivLen] |
tag_len | [IN] 메시지 인증 태그의 길이 [CCM : 4 ≤ tagLen ≤ 16, GCM : tagLen ≤ 16] |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Decrypt_Auth | ( | void * | plaintext, |
int * | plaintext_len, | ||
int | plaintext_alloc_len, | ||
void * | ciphertext, | ||
int | ciphertext_len, | ||
void * | authdata, | ||
int | authdata_len, | ||
void * | iv, | ||
int | iv_len, | ||
int | tag_len, | ||
SECONTEXT * | secontext | ||
) |
입력한 암호문을 CCM/GCM 방식으로 복호화한다.
plaintext | [OUT] 복호화 된 원문 버퍼 |
plaintext_len | [OUT] 실제 복호화 된 원문 크기 |
plaintext_alloc_len | [IN] 복호화 된 원문 버퍼의 크기 |
ciphertext | [IN] 암호문 |
ciphertext_len | [IN] 암호문의 크기 |
authdata | [IN] CCM/GCM의 추가 데이터 |
authdata_len | [IN] CCM/GCM의 추가 데이터의 길이 |
iv | [IN] GCM의 iv, CCM의 nonce |
iv_len | [IN] GCM의 iv, CCM의 nonce의 길이 [CCM : 7 ≤ nonceLen ≤ 13, GCM : 12 ≤ ivLen] |
tag_len | [IN] 메시지 인증 태그의 길이 [CCM : 4 ≤ tagLen ≤ 16, GCM : tagLen ≤ 16] |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Encrypt_CMS | ( | void * | ciphertext, |
int * | ciphertext_len, | ||
int | ciphertext_alloc_len, | ||
void * | plaintext, | ||
int | plaintext_len, | ||
SECONTEXT * | secontext | ||
) |
PKCS #7 - EnvelopedData 메시지 형식으로 암호화한다.
ciphertext | [OUT] PKCS #7 - EnvelopedData 메시지 버퍼 |
ciphertext_len | [OUT] 실제 PKCS #7 - EnvelopedData 메시지 의 크기 |
ciphertext_alloc_len | [IN] PKCS #7 - EnvelopedData 메시지 버퍼의 크기 |
plaintext | [IN] 암호화 대상 원문 |
plaintext_len | [IN] 암호화 대상 원문의 크기 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_Decrypt_CMS | ( | void * | plaintext, |
int * | plaintext_len, | ||
int | plaintext_alloc_len, | ||
void * | ciphertext, | ||
int | ciphertext_len, | ||
SECONTEXT * | secontext | ||
) |
PKCS #7 - EnvelopedData 메시지 형식의 암호문을 복호화한다.
plaintext | [OUT] 복호화 된 원문 버퍼 |
plaintext_len | [OUT] 실제 복호화 된 원문 크기 |
plaintext_alloc_len | [IN] 복호화 된 원문 버퍼의 크기 |
ciphertext | [IN] PKCS #7 - EnvelopedData 메시지 |
ciphertext_len | [IN] PKCS #7 - EnvelopedData 메시지 의 크기 |
secontext | [IN] SE 컨텍스트 |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_GetRandom | ( | void * | buf, |
int | buflen | ||
) |
랜덤값을 생성한다.
buf | [OUT] 생성된 랜덤값의 버퍼 |
buflen | [IN] 생성할 랜덤값의 크기 (bytes) |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_PBKDF_PKCS12_GetKey | ( | void * | keyOut, |
int | keyLen, | ||
const char * | passwd | ||
) |
입력된 PIN을 기반으로 암복호화용 키를 생성(유도)한다. (PKCS#12 v1.0 Appendix. B)
keyOut | [OUT] 생성된 키의 버퍼 |
keyLen | [IN] 생성할 암복호화용 키의 길이 (bytes) |
passwd | [IN] 암복호화용 키 생성에 사용할 PIN |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_PBKDF_PKCS12_GetKey_Advanced | ( | void * | keyOut, |
int | keyLen, | ||
int | idByte, | ||
const char * | passwd, | ||
const char * | salt, | ||
int | saltLen, | ||
int | iterations, | ||
int | hashType | ||
) |
입력된 값들을 기반으로 키를 생성(유도)한다. (PKCS#12 v1.0 Appendix. B)
keyOut | [OUT] 생성된 키의 버퍼 |
keyLen | [IN] 생성할 키의 길이 (bytes) |
idByte | [IN] 키의 용도 [1: 암복호화, 2: IV, 3: MAC] |
passwd | [IN] 키 생성에 사용할 PIN |
salt | [IN] salt (표준 참고) |
saltLen | [IN] salt 크기 |
iterations | [IN] iterations (표준 참고) |
hashType | [IN] 키 유도 과정에 사용되는 해시 알고리즘 [0: SHA1, 1: SHA256, 2: HAS160] |
WA_SDK_API ISSAC_RETURN FUNCCALL ISSAC_SE_PBKDF2_GetKey | ( | void * | keyOut, |
int | keyLen, | ||
const char * | passwd, | ||
const char * | salt, | ||
int | saltLen, | ||
int | iterations, | ||
int | hashType | ||
) |
입력된 값들을 기반으로 키를 생성(유도)한다. (PKCS#5 - PBKDF2)
keyOut | [OUT] 생성된 키의 버퍼 |
keyLen | [IN] 생성할 키의 길이 (bytes) |
passwd | [IN] 키 생성에 사용할 PIN |
salt | [IN] salt (표준 참고) |
saltLen | [IN] salt 크기 |
iterations | [IN] iterations (표준 참고) |
hashType | [IN] 키 유도 과정에 사용되는 해시 알고리즘 [0: SHA1, 1: SHA256, 2: HAS160] |