Compare commits
4 Commits
278c2764f2
...
58958a7fc7
Author | SHA1 | Date |
---|---|---|
segfaultDelirium | 58958a7fc7 | |
Mounir IDRASSI | 6d37bd662e | |
segfault_delirium | d6b799a1a8 | |
segfault_delirium | b6cd419582 |
|
@ -269,8 +269,8 @@
|
|||
<entry lang="ko" key="IDT_ACCELERATION_OPTIONS">하드웨어 가속</entry>
|
||||
<entry lang="ko" key="IDT_ASSIGN_HOTKEY">바로가기</entry>
|
||||
<entry lang="ko" key="IDT_AUTORUN">자동 실행 설정 (autorun.inf)</entry>
|
||||
<entry lang="ko" key="IDT_AUTO_DISMOUNT">자동 꺼냄</entry>
|
||||
<entry lang="ko" key="IDT_AUTO_DISMOUNT_ON">다음과 같은 경우 모두 해제하십시오:</entry>
|
||||
<entry lang="ko" key="IDT_AUTO_DISMOUNT">자동으로 마운트 해제</entry>
|
||||
<entry lang="ko" key="IDT_AUTO_DISMOUNT_ON">다음과 같은 경우 모두 해제:</entry>
|
||||
<entry lang="ko" key="IDT_BOOT_LOADER_SCREEN_OPTIONS">부트 로더 화면 옵션</entry>
|
||||
<entry lang="ko" key="IDT_CONFIRM_PASSWORD">암호 확인:</entry>
|
||||
<entry lang="ko" key="IDT_CURRENT">현재 암호</entry>
|
||||
|
@ -732,7 +732,7 @@
|
|||
<entry lang="ko" key="CANT_DISMOUNT_VOLUME">볼륨을 마운트 해제 할 수 없습니다.</entry>
|
||||
<entry lang="ko" key="FORMAT_NTFS_FAILED">Windows에서 볼륨을 NTFS/exFAT/ReFS로 포맷하지 못했습니다.\n\n가능한 경우 다른 유형의 파일 시스템을 선택하고 다시 시도하세요. 또는 볼륨을 포맷하지 않고 (파일 시스템으로 '없음'을 선택)이 마법사를 종료하고 볼륨을 마운트 한 다음 시스템 또는 타사 도구를 사용하여 마운트 된 볼륨을 포맷 할 수 있습니다(볼륨은 암호화 된 상태로 유지됨).</entry>
|
||||
<entry lang="ko" key="FORMAT_NTFS_FAILED_ASK_FAT">Windows에서 볼륨을 NTFS/exFAT/ReFS로 포맷하지 못했습니다.\n\n대신 볼륨을 FAT로 포맷 하시겠습니까?</entry>
|
||||
<entry lang="ko" key="DEFAULT">태만</entry>
|
||||
<entry lang="ko" key="DEFAULT">기본값</entry>
|
||||
<entry lang="ko" key="PARTITION_LOWER_CASE">분할</entry>
|
||||
<entry lang="ko" key="PARTITION_UPPER_CASE">분할</entry>
|
||||
<entry lang="ko" key="DEVICE">장치</entry>
|
||||
|
@ -882,7 +882,7 @@
|
|||
<entry lang="ko" key="INSTALL_COMPLETED">설치 완료.</entry>
|
||||
<entry lang="ko" key="CANT_CREATE_FOLDER">폴더 '%s'을 (를) 만들지 못했습니다.</entry>
|
||||
<entry lang="ko" key="CLOSE_TC_FIRST">VeraCrypt 장치 드라이버를 언로드 할 수 없습니다.\n\n열려있는 모든 VeraCrypt 창을 먼저 닫으세요. 문제가 해결되지 않으면 Windows를 다시 시작한 다음 다시 시도하세요.</entry>
|
||||
<entry lang="ko" key="DISMOUNT_ALL_FIRST">VeraCrypt를 설치하거나 제거하기 전에 모든 VeraCrypt 볼륨을 분리해야합니다.</entry>
|
||||
<entry lang="ko" key="DISMOUNT_ALL_FIRST">VeraCrypt를 설치하거나 제거하기 전에 모든 VeraCrypt 볼륨의 마운트를 해제해야합니다.</entry>
|
||||
<entry lang="ko" key="UNINSTALL_OLD_VERSION_FIRST">VeraCrypt의 구식 버전이 현재이 시스템에 설치되어 있습니다. 이 새 버전의 VeraCrypt를 설치하려면 먼저 제거해야합니다.\n\n이 메시지 상자를 닫으면 이전 버전의 제거 프로그램이 시작됩니다. VeraCrypt를 제거 할 때 볼륨이 암호 해독되지 않습니다. VeraCrypt의 이전 버전을 제거한 후 새 버전의 VeraCrypt 설치 프로그램을 다시 실행하세요.</entry>
|
||||
<entry lang="ko" key="REG_INSTALL_FAILED">레지스트리 항목 설치가 실패했습니다.</entry>
|
||||
<entry lang="ko" key="DRIVER_INSTALL_FAILED">장치 드라이버 설치에 실패했습니다. Windows를 다시 시작한 다음 VeraCrypt를 다시 설치하세요.</entry>
|
||||
|
@ -975,7 +975,7 @@
|
|||
<entry lang="ko" key="SYSTEM_FAVORITES_DLG_TITLE">VeraCrypt - 시스템 즐겨 찾기 볼륨</entry>
|
||||
<entry lang="ko" key="SYS_FAVORITES_HELP_LINK">시스템 선호 볼륨은 무엇입니까?</entry>
|
||||
<entry lang="ko" key="SYS_FAVORITES_REQUIRE_PBA">시스템 파티션/드라이브가 암호화되지 않은 것 같습니다.\n\n시스템 부팅 볼륨 사전 인증 암호 만 사용하여 시스템 선호 볼륨을 마운트 할 수 있습니다. 따라서 시스템 즐겨 찾기 볼륨을 사용하려면 먼저 시스템 파티션/드라이브를 암호화해야합니다.</entry>
|
||||
<entry lang="ko" key="DISMOUNT_FIRST">진행하기 전에 볼륨을 분리하세요.</entry>
|
||||
<entry lang="ko" key="DISMOUNT_FIRST">진행하기 전에 볼륨의 마운트를 해제하세요.</entry>
|
||||
<entry lang="ko" key="CANNOT_SET_TIMER">오류: 타이머를 설정할 수 없습니다.</entry>
|
||||
<entry lang="ko" key="IDPM_CHECK_FILESYS">파일 시스템 검사</entry>
|
||||
<entry lang="ko" key="IDPM_REPAIR_FILESYS">파일 시스템 복구</entry>
|
||||
|
@ -1011,10 +1011,10 @@
|
|||
<entry lang="ko" key="HK_AUTOMOUNT_DEVICES">자동 마운트 장치</entry>
|
||||
<entry lang="ko" key="HK_DISMOUNT_ALL">모두 마운트 해제</entry>
|
||||
<entry lang="ko" key="HK_WIPE_CACHE">캐시 지우기</entry>
|
||||
<entry lang="ko" key="HK_DISMOUNT_ALL_AND_WIPE">모든 지우기 캐시 마운트 해제</entry>
|
||||
<entry lang="ko" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE">모든 지우기 캐시를 강제로 제거합니다.</entry>
|
||||
<entry lang="ko" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT">강제 모두 제거, 캐시 지우기 끝내기</entry>
|
||||
<entry lang="ko" key="HK_MOUNT_FAVORITE_VOLUMES">좋아하는 볼륨 마운트</entry>
|
||||
<entry lang="ko" key="HK_DISMOUNT_ALL_AND_WIPE">전체 마운트 해제 및 캐시 삭제</entry>
|
||||
<entry lang="ko" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE">전체 마운트 강제 해제 및 캐시 삭제</entry>
|
||||
<entry lang="ko" key="HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT">전체 마운트 강제 해제 및 캐시 삭제 후 종료</entry>
|
||||
<entry lang="ko" key="HK_MOUNT_FAVORITE_VOLUMES">자주찾는 볼륨 마운트</entry>
|
||||
<entry lang="ko" key="HK_SHOW_HIDE_MAIN_WINDOW">주 VeraCrypt 창 표시/숨기기</entry>
|
||||
<entry lang="ko" key="PRESS_A_KEY_TO_ASSIGN">(여기를 클릭하고 키를 누르십시오)</entry>
|
||||
<entry lang="ko" key="ACTION">동작</entry>
|
||||
|
@ -1026,11 +1026,11 @@
|
|||
<entry lang="ko" key="SYS_ENC_HIBERNATION_PREVENTED">오류 또는 비 호환성으로 인해 VeraCrypt가 최대 절전 모드 파일을 암호화하지 못합니다. 따라서 최대 절전 모드가 차단되었습니다.\n\n참고: 컴퓨터가 최대 절전 모드로 전환되거나 절전 모드로 전환되면 시스템 메모리의 내용이 시스템 드라이브에있는 최대 절전 모드 저장 파일에 기록됩니다. VeraCrypt는 암호화 키를 방지 할 수 없으며 RAM에서 열린 민감한 파일의 내용이 암호화되지 않은 상태에서 최대 절전 모드 저장 파일에 저장되지 않습니다.</entry>
|
||||
<entry lang="ko" key="HIDDEN_OS_HIBERNATION_PREVENTED">최대 절전 모드가 차단되었습니다.\n\nVeraCrypt는 추가 부팅 파티션을 사용하는 숨겨진 운영 체제에서 최대 절전 모드를 지원하지 않습니다. 부팅 파티션은 미끼와 숨겨진 시스템에서 공유됩니다. 따라서 최대 절전 모드에서 다시 시작하는 동안 데이터 누출 및 문제를 방지하기 위해 VeraCrypt는 숨겨진 시스템이 공유 부팅 파티션에 쓰거나 최대 절전 모드로 전환하는 것을 방지해야합니다.</entry>
|
||||
<entry lang="ko" key="VOLUME_MOUNTED_AS_DRIVE_LETTER_X_DISMOUNTED">%c:로 마운트 된 VeraCrypt 볼륨이 마운트 해제되었습니다.</entry>
|
||||
<entry lang="ko" key="MOUNTED_VOLUMES_DISMOUNTED">VeraCrypt 볼륨이 분리되었습니다.</entry>
|
||||
<entry lang="ko" key="VOLUMES_DISMOUNTED_CACHE_WIPED">VeraCrypt 볼륨이 분리되었으며 암호 캐시가 지워졌습니다.</entry>
|
||||
<entry lang="ko" key="MOUNTED_VOLUMES_DISMOUNTED">VeraCrypt 볼륨이 마운트 해제되었습니다.</entry>
|
||||
<entry lang="ko" key="VOLUMES_DISMOUNTED_CACHE_WIPED">VeraCrypt 볼륨이 마운트 해제되었으며 암호 캐시가 지워졌습니다.</entry>
|
||||
<entry lang="ko" key="SUCCESSFULLY_DISMOUNTED">성공적으로 마운트 해제 됨</entry>
|
||||
<entry lang="ko" key="CONFIRM_BACKGROUND_TASK_DISABLED">경고: VeraCrypt 백그라운드 작업을 사용하지 않으면 다음 기능이 비활성화됩니다.\n\n1) 핫 키\n2) 자동 마운트 해제 (예: 로그 오프, 부주의 한 호스트 장치 제거, 시간 초과 등)\n3 ) 좋아하는 볼륨의 자동 마운트\n4) 알림 (예: 숨겨진 볼륨의 손상이 방지 된 경우)\n5) 트레이 아이콘\n\n참고: VeraCrypt 트레이 아이콘을 마우스 오른쪽 버튼으로 클릭하고 백그라운드 작업을 종료 할 수 있습니다. '종료'를 선택하세요.\n\nVeraCrypt 백그라운드 작업을 영구적으로 비활성화 하시겠습니까?</entry>
|
||||
<entry lang="ko" key="CONFIRM_NO_FORCED_AUTODISMOUNT">경고 :이 옵션을 사용하지 않으면 열려있는 파일/디렉토리가있는 볼륨을 자동 마운트 해제 할 수 없습니다.\n\n이 옵션을 비활성화 하시겠습니까?</entry>
|
||||
<entry lang="ko" key="CONFIRM_NO_FORCED_AUTODISMOUNT">경고 :이 옵션을 사용하지 않으면 열려있는 파일/디렉토리가있는 볼륨을 자동으로 마운트 해제 할 수 없습니다.\n\n이 옵션을 비활성화 하시겠습니까?</entry>
|
||||
<entry lang="ko" key="WARN_PREF_AUTO_DISMOUNT">경고: 열린 파일/디렉토리가있는 볼륨은 자동으로 마운트 해제되지 않습니다.\n\n이렇게하려면이 대화 상자 창에서 다음 옵션을 활성화하십시오: '볼륨에 열려있는 파일이나 디렉토리가 있어도 자동 마운트 해제를 강제하십시오'</entry>
|
||||
<entry lang="ko" key="WARN_PREF_AUTO_DISMOUNT_ON_POWER">경고: 노트북 배터리 전원이 낮 으면 컴퓨터가 절전 모드로 전환 될 때 Windows에서 실행중인 응용 프로그램으로 적절한 메시지를 보내지 않을 수 있습니다. 따라서 VeraCrypt는 이러한 경우 자동 볼륨 마운트 해제에 실패 할 수 있습니다.</entry>
|
||||
<entry lang="ko" key="NONSYS_INPLACE_ENC_RESUME_PROMPT">파티션/볼륨의 암호화/암호 해독 프로세스를 예약했습니다. 프로세스가 아직 완료되지 않았습니다.\n\n지금 프로세스를 재개 하시겠습니까?</entry>
|
||||
|
|
|
@ -122,7 +122,6 @@ typedef int8_t int8;
|
|||
typedef int16_t int16;
|
||||
typedef int32_t int32;
|
||||
typedef int64_t int64;
|
||||
typedef uint8_t byte;
|
||||
typedef uint8_t uint8;
|
||||
typedef uint16_t uint16;
|
||||
typedef uint32_t uint32;
|
||||
|
|
|
@ -21,13 +21,13 @@ extern "C"
|
|||
#endif
|
||||
|
||||
#if defined (TC_WINDOWS_BOOT)
|
||||
byte is_aes_hw_cpu_supported ();
|
||||
uint8_t is_aes_hw_cpu_supported ();
|
||||
#endif
|
||||
void aes_hw_cpu_enable_sse ();
|
||||
void aes_hw_cpu_decrypt (const byte *ks, byte *data);
|
||||
void aes_hw_cpu_decrypt_32_blocks (const byte *ks, byte *data);
|
||||
void aes_hw_cpu_encrypt (const byte *ks, byte *data);
|
||||
void aes_hw_cpu_encrypt_32_blocks (const byte *ks, byte *data);
|
||||
void aes_hw_cpu_decrypt (const uint8_t *ks, uint8_t *data);
|
||||
void aes_hw_cpu_decrypt_32_blocks (const uint8_t *ks, uint8_t *data);
|
||||
void aes_hw_cpu_encrypt (const uint8_t *ks, uint8_t *data);
|
||||
void aes_hw_cpu_encrypt_32_blocks (const uint8_t *ks, uint8_t *data);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
* NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved.
|
||||
*
|
||||
* SuperCop integration:
|
||||
* Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
* Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
*
|
||||
* VeraCrypt integration:
|
||||
* Copyright © 2017 Mounir IDRASSI <mounir.idrassi@idrix.fr>
|
||||
* Copyright © 2017 Mounir IDRASSI <mounir.idrassi@idrix.fr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -51,12 +51,12 @@
|
|||
extern int IsAesHwCpuSupported ();
|
||||
#endif
|
||||
|
||||
void camellia_encrypt_asm(const byte *ctx, void *dst, const void *src);
|
||||
void camellia_decrypt_asm(const byte *ctx, void *dst, const void *src);
|
||||
void camellia_enc_blk2(const byte *ctx, byte *dst, const byte *src);
|
||||
void camellia_dec_blk2(const byte *ctx, byte *dst, const byte *src);
|
||||
void camellia_ecb_enc_16way(const byte *ctx, byte *dst, const byte *src);
|
||||
void camellia_ecb_dec_16way(const byte *ctx, byte *dst, const byte *src);
|
||||
void camellia_encrypt_asm(const uint8_t *ctx, void *dst, const void *src);
|
||||
void camellia_decrypt_asm(const uint8_t *ctx, void *dst, const void *src);
|
||||
void camellia_enc_blk2(const uint8_t *ctx, uint8_t *dst, const uint8_t *src);
|
||||
void camellia_dec_blk2(const uint8_t *ctx, uint8_t *dst, const uint8_t *src);
|
||||
void camellia_ecb_enc_16way(const uint8_t *ctx, uint8_t *dst, const uint8_t *src);
|
||||
void camellia_ecb_dec_16way(const uint8_t *ctx, uint8_t *dst, const uint8_t *src);
|
||||
|
||||
/* key constants */
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock
|
|||
camellia_decrypt_asm (ks, outBlock, inBlock);
|
||||
}
|
||||
|
||||
void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
|
||||
void camellia_encrypt_blocks(unsigned __int8 *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount)
|
||||
{
|
||||
#if !defined (_UEFI)
|
||||
if ((blockCount >= 16) && IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */
|
||||
|
@ -1129,7 +1129,7 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
|
|||
camellia_encrypt (in_blk, out_blk, instance);
|
||||
}
|
||||
|
||||
void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
|
||||
void camellia_decrypt_blocks(unsigned __int8 *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount)
|
||||
{
|
||||
#if !defined (_UEFI)
|
||||
if ((blockCount >= 16) && IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */
|
||||
|
|
|
@ -18,8 +18,8 @@ void camellia_encrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock,
|
|||
void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks);
|
||||
|
||||
#if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM)
|
||||
void camellia_encrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount);
|
||||
void camellia_decrypt_blocks(unsigned __int8 *ks, const byte* in_blk, byte* out_blk, uint32 blockCount);
|
||||
void camellia_encrypt_blocks(unsigned __int8 *ks, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount);
|
||||
void camellia_decrypt_blocks(unsigned __int8 *ks, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -447,7 +447,7 @@ static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(uint_32t *state, const uint_
|
|||
|
||||
#if defined(__GNUC__)
|
||||
#if CRYPTOPP_BOOL_X64
|
||||
CRYPTOPP_ALIGN_DATA(16) byte workspace[LOCALS_SIZE] ;
|
||||
CRYPTOPP_ALIGN_DATA(16) uint8_t workspace[LOCALS_SIZE] ;
|
||||
#endif
|
||||
__asm__ __volatile__
|
||||
(
|
||||
|
|
|
@ -2253,7 +2253,7 @@ stage3(STREEBOG_CTX *CTX)
|
|||
memcpy((CTX->hash), (CTX->h), 8 * sizeof(unsigned long long));
|
||||
}
|
||||
|
||||
void STREEBOG_add(STREEBOG_CTX *CTX, const byte *data, size_t len)
|
||||
void STREEBOG_add(STREEBOG_CTX *CTX, const uint8_t *data, size_t len)
|
||||
{
|
||||
size_t chunksize;
|
||||
|
||||
|
@ -2286,7 +2286,7 @@ void STREEBOG_add(STREEBOG_CTX *CTX, const byte *data, size_t len)
|
|||
}
|
||||
}
|
||||
|
||||
void STREEBOG_finalize(STREEBOG_CTX *CTX, byte *digest)
|
||||
void STREEBOG_finalize(STREEBOG_CTX *CTX, uint8_t *digest)
|
||||
{
|
||||
stage3(CTX);
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ typedef STREEBOG_ALIGN(16) struct _STREEBOG_CTX
|
|||
|
||||
void STREEBOG_init(STREEBOG_CTX *ctx);
|
||||
void STREEBOG_init256(STREEBOG_CTX *ctx);
|
||||
void STREEBOG_add(STREEBOG_CTX *ctx, const byte *msg, size_t len);
|
||||
void STREEBOG_finalize(STREEBOG_CTX *ctx, byte *out);
|
||||
void STREEBOG_add(STREEBOG_CTX *ctx, const uint8_t *msg, size_t len);
|
||||
void STREEBOG_finalize(STREEBOG_CTX *ctx, uint8_t *out);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -57,25 +57,25 @@
|
|||
#if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM)
|
||||
|
||||
/* these are 64-bit assembly implementation taken from https://github.com/jkivilin/supercop-blockciphers
|
||||
Copyright © 2011-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
Copyright © 2011-2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void twofish_enc_blk(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_dec_blk(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_enc_blk2(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_dec_blk2(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_enc_blk3(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_dec_blk3(TwofishInstance *ks, byte *dst, const byte *src);
|
||||
void twofish_enc_blk(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
void twofish_dec_blk(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
void twofish_enc_blk2(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
void twofish_dec_blk2(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
void twofish_enc_blk3(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
void twofish_dec_blk3(TwofishInstance *ks, uint8_t *dst, const uint8_t *src);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
|
||||
void twofish_encrypt_blocks(TwofishInstance *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount)
|
||||
{
|
||||
while (blockCount >= 3)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte*
|
|||
|
||||
}
|
||||
|
||||
void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
|
||||
void twofish_decrypt_blocks(TwofishInstance *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount)
|
||||
{
|
||||
while (blockCount >= 3)
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte*
|
|||
|
||||
#endif
|
||||
|
||||
static const byte Q[2][256] = {
|
||||
static const uint8_t Q[2][256] = {
|
||||
{
|
||||
0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38,
|
||||
0x0d, 0xc6, 0x35, 0x98, 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, 0x94, 0x48,
|
||||
|
@ -604,11 +604,11 @@ static const uint32 RS[8][256] = {
|
|||
void twofish_set_key(TwofishInstance *instance, const u4byte in_key[])
|
||||
{
|
||||
union {
|
||||
byte S8[16];
|
||||
uint8_t S8[16];
|
||||
uint32 S32[4];
|
||||
} us;
|
||||
unsigned int i;
|
||||
const byte* key = (const byte*) in_key;
|
||||
const uint8_t* key = (const uint8_t*) in_key;
|
||||
|
||||
us.S32[0] = RS[0][key[0]] ^ RS[1][key[1]] ^ RS[2][key[2]] ^ RS[3][key[3]] ^ RS[4][key[4]] ^ RS[5][key[5]] ^ RS[6][key[6]] ^ RS[7][key[7]];
|
||||
us.S32[1] = RS[0][key[8]] ^ RS[1][key[9]] ^ RS[2][key[10]] ^ RS[3][key[11]] ^ RS[4][key[12]] ^ RS[5][key[13]] ^ RS[6][key[14]] ^ RS[7][key[15]];
|
||||
|
|
|
@ -55,10 +55,10 @@ typedef struct
|
|||
/* in_key must be 32-bytes long */
|
||||
void twofish_set_key(TwofishInstance *instance, const u4byte in_key[]);
|
||||
#if CRYPTOPP_BOOL_X64 && !defined(CRYPTOPP_DISABLE_ASM)
|
||||
void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount);
|
||||
void twofish_decrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount);
|
||||
#define twofish_encrypt(instance,in_blk,out_blk) twofish_encrypt_blocks(instance, (const byte*) in_blk, (byte*) out_blk, 1)
|
||||
#define twofish_decrypt(instance,in_blk,out_blk) twofish_decrypt_blocks(instance, (const byte*) in_blk, (byte*) out_blk, 1)
|
||||
void twofish_encrypt_blocks(TwofishInstance *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount);
|
||||
void twofish_decrypt_blocks(TwofishInstance *instance, const uint8_t* in_blk, uint8_t* out_blk, uint32 blockCount);
|
||||
#define twofish_encrypt(instance,in_blk,out_blk) twofish_encrypt_blocks(instance, (const uint8_t*) in_blk, (uint8_t*) out_blk, 1)
|
||||
#define twofish_decrypt(instance,in_blk,out_blk) twofish_decrypt_blocks(instance, (const uint8_t*) in_blk, (uint8_t*) out_blk, 1)
|
||||
#else
|
||||
void twofish_encrypt(TwofishInstance *instance, const u4byte in_blk[4], u4byte out_blk[4]);
|
||||
void twofish_decrypt(TwofishInstance *instance, const u4byte in_blk[4], u4byte out_blk[4]);
|
||||
|
|
|
@ -936,7 +936,7 @@ void WHIRLPOOL_add(const unsigned char * input,
|
|||
else
|
||||
{
|
||||
uint64* dataBuf = ctx->data;
|
||||
byte* data = (byte *)dataBuf;
|
||||
uint8_t* data = (uint8_t *)dataBuf;
|
||||
num = oldCountLo & 63;
|
||||
|
||||
if (num != 0) // process left over data
|
||||
|
@ -996,7 +996,7 @@ void WHIRLPOOL_finalize(WHIRLPOOL_CTX * const ctx,
|
|||
unsigned int num = ctx->countLo & 63;
|
||||
uint64* dataBuf = ctx->data;
|
||||
uint64* stateBuf = ctx->state;
|
||||
byte* data = (byte *)dataBuf;
|
||||
uint8_t* data = (uint8_t *)dataBuf;
|
||||
|
||||
data[num++] = 0x80;
|
||||
if (num <= 32)
|
||||
|
|
|
@ -12,16 +12,16 @@ and released into public domain.
|
|||
#endif
|
||||
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
void kuznyechik_set_key_simd(const byte* key, kuznyechik_kds *kds);
|
||||
void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_set_key_simd(const uint8_t* key, kuznyechik_kds *kds);
|
||||
void kuznyechik_encrypt_block_simd(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_encrypt_blocks_simd(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_block_simd(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_blocks_simd(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds);
|
||||
#endif
|
||||
|
||||
//#define CPPCRYPTO_DEBUG
|
||||
|
||||
static const byte S[256] = {
|
||||
static const uint8_t S[256] = {
|
||||
252, 238, 221, 17, 207, 110, 49, 22, 251, 196, 250, 218, 35, 197, 4, 77, 233, 119, 240, 219, 147, 46, 153, 186, 23, 54, 241, 187, 20, 205, 95, 193,
|
||||
249, 24, 101, 90, 226, 92, 239, 33, 129, 28, 60, 66, 139, 1, 142, 79, 5, 132, 2, 174, 227, 106, 143, 160, 6, 11, 237, 152, 127, 212, 211, 31,
|
||||
235, 52, 44, 81, 234, 200, 72, 171, 242, 42, 104, 162, 253, 58, 206, 204, 181, 112, 14, 86, 8, 12, 118, 18, 191, 114, 19, 71, 156, 183, 93, 135,
|
||||
|
@ -32,7 +32,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
32, 113, 103, 164, 45, 43, 9, 91, 203, 155, 37, 208, 190, 229, 108, 82, 89, 166, 116, 210, 230, 244, 180, 192, 209, 102, 175, 194, 57, 75, 99, 182
|
||||
};
|
||||
|
||||
static const byte IS[256] = {
|
||||
static const uint8_t IS[256] = {
|
||||
165, 45, 50, 143, 14, 48, 56, 192, 84, 230, 158, 57, 85, 126, 82, 145, 100, 3, 87, 90, 28, 96, 7, 24, 33, 114, 168, 209, 41, 198, 164, 63,
|
||||
224, 39, 141, 12, 130, 234, 174, 180, 154, 99, 73, 229, 66, 228, 21, 183, 200, 6, 112, 157, 65, 117, 25, 201, 170, 252, 77, 191, 42, 115, 132, 213,
|
||||
195, 175, 43, 134, 167, 177, 178, 91, 70, 211, 159, 253, 212, 15, 156, 47, 155, 67, 239, 217, 121, 182, 83, 127, 193, 240, 35, 231, 37, 94, 181, 30,
|
||||
|
@ -2144,30 +2144,30 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
};
|
||||
|
||||
#define LS(x1,x2,t1,t2) { \
|
||||
t1 = T[0][(byte)(x1)][0] ^ T[1][(byte)(x1 >> 8)][0] ^ T[2][(byte)(x1 >> 16)][0] ^ T[3][(byte)(x1 >> 24)][0] ^ T[4][(byte)(x1 >> 32)][0] ^ T[5][(byte)(x1 >> 40)][0] ^ \
|
||||
T[6][(byte)(x1 >> 48)][0] ^ T[7][(byte)(x1 >> 56)][0] ^ T[8][(byte)(x2)][0] ^ T[9][(byte)(x2 >> 8)][0] ^ T[10][(byte)(x2 >> 16)][0] ^ T[11][(byte)(x2 >> 24)][0] ^ \
|
||||
T[12][(byte)(x2 >> 32)][0] ^ T[13][(byte)(x2 >> 40)][0] ^ T[14][(byte)(x2 >> 48)][0] ^ T[15][(byte)(x2 >> 56)][0]; \
|
||||
t2 = T[0][(byte)(x1)][1] ^ T[1][(byte)(x1 >> 8)][1] ^ T[2][(byte)(x1 >> 16)][1] ^ T[3][(byte)(x1 >> 24)][1] ^ T[4][(byte)(x1 >> 32)][1] ^ T[5][(byte)(x1 >> 40)][1] ^ \
|
||||
T[6][(byte)(x1 >> 48)][1] ^ T[7][(byte)(x1 >> 56)][1] ^ T[8][(byte)(x2)][1] ^ T[9][(byte)(x2 >> 8)][1] ^ T[10][(byte)(x2 >> 16)][1] ^ T[11][(byte)(x2 >> 24)][1] ^ \
|
||||
T[12][(byte)(x2 >> 32)][1] ^ T[13][(byte)(x2 >> 40)][1] ^ T[14][(byte)(x2 >> 48)][1] ^ T[15][(byte)(x2 >> 56)][1]; \
|
||||
t1 = T[0][(uint8_t)(x1)][0] ^ T[1][(uint8_t)(x1 >> 8)][0] ^ T[2][(uint8_t)(x1 >> 16)][0] ^ T[3][(uint8_t)(x1 >> 24)][0] ^ T[4][(uint8_t)(x1 >> 32)][0] ^ T[5][(uint8_t)(x1 >> 40)][0] ^ \
|
||||
T[6][(uint8_t)(x1 >> 48)][0] ^ T[7][(uint8_t)(x1 >> 56)][0] ^ T[8][(uint8_t)(x2)][0] ^ T[9][(uint8_t)(x2 >> 8)][0] ^ T[10][(uint8_t)(x2 >> 16)][0] ^ T[11][(uint8_t)(x2 >> 24)][0] ^ \
|
||||
T[12][(uint8_t)(x2 >> 32)][0] ^ T[13][(uint8_t)(x2 >> 40)][0] ^ T[14][(uint8_t)(x2 >> 48)][0] ^ T[15][(uint8_t)(x2 >> 56)][0]; \
|
||||
t2 = T[0][(uint8_t)(x1)][1] ^ T[1][(uint8_t)(x1 >> 8)][1] ^ T[2][(uint8_t)(x1 >> 16)][1] ^ T[3][(uint8_t)(x1 >> 24)][1] ^ T[4][(uint8_t)(x1 >> 32)][1] ^ T[5][(uint8_t)(x1 >> 40)][1] ^ \
|
||||
T[6][(uint8_t)(x1 >> 48)][1] ^ T[7][(uint8_t)(x1 >> 56)][1] ^ T[8][(uint8_t)(x2)][1] ^ T[9][(uint8_t)(x2 >> 8)][1] ^ T[10][(uint8_t)(x2 >> 16)][1] ^ T[11][(uint8_t)(x2 >> 24)][1] ^ \
|
||||
T[12][(uint8_t)(x2 >> 32)][1] ^ T[13][(uint8_t)(x2 >> 40)][1] ^ T[14][(uint8_t)(x2 >> 48)][1] ^ T[15][(uint8_t)(x2 >> 56)][1]; \
|
||||
}
|
||||
|
||||
#define ILS(x1,x2,t1,t2) { \
|
||||
t1 = IT[0][(byte)(x1)][0] ^ IT[1][(byte)(x1 >> 8)][0] ^ IT[2][(byte)(x1 >> 16)][0] ^ IT[3][(byte)(x1 >> 24)][0] ^ IT[4][(byte)(x1 >> 32)][0] ^ IT[5][(byte)(x1 >> 40)][0] ^ \
|
||||
IT[6][(byte)(x1 >> 48)][0] ^ IT[7][(byte)(x1 >> 56)][0] ^ IT[8][(byte)(x2)][0] ^ IT[9][(byte)(x2 >> 8)][0] ^ IT[10][(byte)(x2 >> 16)][0] ^ IT[11][(byte)(x2 >> 24)][0] ^ \
|
||||
IT[12][(byte)(x2 >> 32)][0] ^ IT[13][(byte)(x2 >> 40)][0] ^ IT[14][(byte)(x2 >> 48)][0] ^ IT[15][(byte)(x2 >> 56)][0]; \
|
||||
t2 = IT[0][(byte)(x1)][1] ^ IT[1][(byte)(x1 >> 8)][1] ^ IT[2][(byte)(x1 >> 16)][1] ^ IT[3][(byte)(x1 >> 24)][1] ^ IT[4][(byte)(x1 >> 32)][1] ^ IT[5][(byte)(x1 >> 40)][1] ^ \
|
||||
IT[6][(byte)(x1 >> 48)][1] ^ IT[7][(byte)(x1 >> 56)][1] ^ IT[8][(byte)(x2)][1] ^ IT[9][(byte)(x2 >> 8)][1] ^ IT[10][(byte)(x2 >> 16)][1] ^ IT[11][(byte)(x2 >> 24)][1] ^ \
|
||||
IT[12][(byte)(x2 >> 32)][1] ^ IT[13][(byte)(x2 >> 40)][1] ^ IT[14][(byte)(x2 >> 48)][1] ^ IT[15][(byte)(x2 >> 56)][1]; \
|
||||
t1 = IT[0][(uint8_t)(x1)][0] ^ IT[1][(uint8_t)(x1 >> 8)][0] ^ IT[2][(uint8_t)(x1 >> 16)][0] ^ IT[3][(uint8_t)(x1 >> 24)][0] ^ IT[4][(uint8_t)(x1 >> 32)][0] ^ IT[5][(uint8_t)(x1 >> 40)][0] ^ \
|
||||
IT[6][(uint8_t)(x1 >> 48)][0] ^ IT[7][(uint8_t)(x1 >> 56)][0] ^ IT[8][(uint8_t)(x2)][0] ^ IT[9][(uint8_t)(x2 >> 8)][0] ^ IT[10][(uint8_t)(x2 >> 16)][0] ^ IT[11][(uint8_t)(x2 >> 24)][0] ^ \
|
||||
IT[12][(uint8_t)(x2 >> 32)][0] ^ IT[13][(uint8_t)(x2 >> 40)][0] ^ IT[14][(uint8_t)(x2 >> 48)][0] ^ IT[15][(uint8_t)(x2 >> 56)][0]; \
|
||||
t2 = IT[0][(uint8_t)(x1)][1] ^ IT[1][(uint8_t)(x1 >> 8)][1] ^ IT[2][(uint8_t)(x1 >> 16)][1] ^ IT[3][(uint8_t)(x1 >> 24)][1] ^ IT[4][(uint8_t)(x1 >> 32)][1] ^ IT[5][(uint8_t)(x1 >> 40)][1] ^ \
|
||||
IT[6][(uint8_t)(x1 >> 48)][1] ^ IT[7][(uint8_t)(x1 >> 56)][1] ^ IT[8][(uint8_t)(x2)][1] ^ IT[9][(uint8_t)(x2 >> 8)][1] ^ IT[10][(uint8_t)(x2 >> 16)][1] ^ IT[11][(uint8_t)(x2 >> 24)][1] ^ \
|
||||
IT[12][(uint8_t)(x2 >> 32)][1] ^ IT[13][(uint8_t)(x2 >> 40)][1] ^ IT[14][(uint8_t)(x2 >> 48)][1] ^ IT[15][(uint8_t)(x2 >> 56)][1]; \
|
||||
}
|
||||
|
||||
#define ILSS(x1,x2,t1,t2) { \
|
||||
t1 = IT[0][S[(byte)(x1)]][0] ^ IT[1][S[(byte)(x1 >> 8)]][0] ^ IT[2][S[(byte)(x1 >> 16)]][0] ^ IT[3][S[(byte)(x1 >> 24)]][0] ^ IT[4][S[(byte)(x1 >> 32)]][0] ^ IT[5][S[(byte)(x1 >> 40)]][0] ^ \
|
||||
IT[6][S[(byte)(x1 >> 48)]][0] ^ IT[7][S[(byte)(x1 >> 56)]][0] ^ IT[8][S[(byte)(x2)]][0] ^ IT[9][S[(byte)(x2 >> 8)]][0] ^ IT[10][S[(byte)(x2 >> 16)]][0] ^ IT[11][S[(byte)(x2 >> 24)]][0] ^ \
|
||||
IT[12][S[(byte)(x2 >> 32)]][0] ^ IT[13][S[(byte)(x2 >> 40)]][0] ^ IT[14][S[(byte)(x2 >> 48)]][0] ^ IT[15][S[(byte)(x2 >> 56)]][0]; \
|
||||
t2 = IT[0][S[(byte)(x1)]][1] ^ IT[1][S[(byte)(x1 >> 8)]][1] ^ IT[2][S[(byte)(x1 >> 16)]][1] ^ IT[3][S[(byte)(x1 >> 24)]][1] ^ IT[4][S[(byte)(x1 >> 32)]][1] ^ IT[5][S[(byte)(x1 >> 40)]][1] ^ \
|
||||
IT[6][S[(byte)(x1 >> 48)]][1] ^ IT[7][S[(byte)(x1 >> 56)]][1] ^ IT[8][S[(byte)(x2)]][1] ^ IT[9][S[(byte)(x2 >> 8)]][1] ^ IT[10][S[(byte)(x2 >> 16)]][1] ^ IT[11][S[(byte)(x2 >> 24)]][1] ^ \
|
||||
IT[12][S[(byte)(x2 >> 32)]][1] ^ IT[13][S[(byte)(x2 >> 40)]][1] ^ IT[14][S[(byte)(x2 >> 48)]][1] ^ IT[15][S[(byte)(x2 >> 56)]][1]; \
|
||||
t1 = IT[0][S[(uint8_t)(x1)]][0] ^ IT[1][S[(uint8_t)(x1 >> 8)]][0] ^ IT[2][S[(uint8_t)(x1 >> 16)]][0] ^ IT[3][S[(uint8_t)(x1 >> 24)]][0] ^ IT[4][S[(uint8_t)(x1 >> 32)]][0] ^ IT[5][S[(uint8_t)(x1 >> 40)]][0] ^ \
|
||||
IT[6][S[(uint8_t)(x1 >> 48)]][0] ^ IT[7][S[(uint8_t)(x1 >> 56)]][0] ^ IT[8][S[(uint8_t)(x2)]][0] ^ IT[9][S[(uint8_t)(x2 >> 8)]][0] ^ IT[10][S[(uint8_t)(x2 >> 16)]][0] ^ IT[11][S[(uint8_t)(x2 >> 24)]][0] ^ \
|
||||
IT[12][S[(uint8_t)(x2 >> 32)]][0] ^ IT[13][S[(uint8_t)(x2 >> 40)]][0] ^ IT[14][S[(uint8_t)(x2 >> 48)]][0] ^ IT[15][S[(uint8_t)(x2 >> 56)]][0]; \
|
||||
t2 = IT[0][S[(uint8_t)(x1)]][1] ^ IT[1][S[(uint8_t)(x1 >> 8)]][1] ^ IT[2][S[(uint8_t)(x1 >> 16)]][1] ^ IT[3][S[(uint8_t)(x1 >> 24)]][1] ^ IT[4][S[(uint8_t)(x1 >> 32)]][1] ^ IT[5][S[(uint8_t)(x1 >> 40)]][1] ^ \
|
||||
IT[6][S[(uint8_t)(x1 >> 48)]][1] ^ IT[7][S[(uint8_t)(x1 >> 56)]][1] ^ IT[8][S[(uint8_t)(x2)]][1] ^ IT[9][S[(uint8_t)(x2 >> 8)]][1] ^ IT[10][S[(uint8_t)(x2 >> 16)]][1] ^ IT[11][S[(uint8_t)(x2 >> 24)]][1] ^ \
|
||||
IT[12][S[(uint8_t)(x2 >> 32)]][1] ^ IT[13][S[(uint8_t)(x2 >> 40)]][1] ^ IT[14][S[(uint8_t)(x2 >> 48)]][1] ^ IT[15][S[(uint8_t)(x2 >> 56)]][1]; \
|
||||
}
|
||||
|
||||
#define ISI(val) { \
|
||||
|
@ -2199,7 +2199,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
} \
|
||||
}
|
||||
|
||||
void kuznyechik_set_key(const byte* key, kuznyechik_kds* kds)
|
||||
void kuznyechik_set_key(const uint8_t* key, kuznyechik_kds* kds)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64)))
|
||||
if(HasSSE2())
|
||||
|
@ -2258,7 +2258,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
|
||||
}
|
||||
|
||||
void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds)
|
||||
void kuznyechik_encrypt_block(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64)))
|
||||
if(HasSSE2())
|
||||
|
@ -2305,7 +2305,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
}
|
||||
}
|
||||
|
||||
void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds)
|
||||
void kuznyechik_encrypt_blocks(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER))
|
||||
if(HasSSE2())
|
||||
|
@ -2325,7 +2325,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
}
|
||||
}
|
||||
|
||||
void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds)
|
||||
void kuznyechik_decrypt_block(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (TC_WINDOWS_DRIVER) || (!defined (DEBUG) && defined (_WIN64)))
|
||||
if(HasSSE2())
|
||||
|
@ -2366,8 +2366,8 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
ILS(x1, x2, t1, t2);
|
||||
t1 ^= kds->rkd[2];
|
||||
t2 ^= kds->rkd[3];
|
||||
ISI((byte*)&t1);
|
||||
ISI((byte*)&t2);
|
||||
ISI((uint8_t*)&t1);
|
||||
ISI((uint8_t*)&t2);
|
||||
t1 ^= kds->rkd[0];
|
||||
t2 ^= kds->rkd[1];
|
||||
*(uint64*)out = t1;
|
||||
|
@ -2375,7 +2375,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
}
|
||||
}
|
||||
|
||||
void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds)
|
||||
void kuznyechik_decrypt_blocks(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds)
|
||||
{
|
||||
#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined(_UEFI) && (!defined (DEBUG) || !defined (TC_WINDOWS_DRIVER))
|
||||
if(HasSSE2())
|
||||
|
|
|
@ -22,11 +22,11 @@ typedef struct _kuznyechik_kds
|
|||
|
||||
#define KUZNYECHIK_KS (sizeof(kuznyechik_kds))
|
||||
|
||||
void kuznyechik_encrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_encrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_block(byte* out, const byte* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_blocks(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_set_key(const byte* key, kuznyechik_kds *kds);
|
||||
void kuznyechik_encrypt_block(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_encrypt_blocks(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_block(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds);
|
||||
void kuznyechik_decrypt_blocks(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds);
|
||||
void kuznyechik_set_key(const uint8_t* key, kuznyechik_kds *kds);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -9169,7 +9169,7 @@ VC_INLINE void scheduleDecryptionRoundKeysForGost15(
|
|||
applyLSTransformation_4(data1_, data2_, data3_,data4_); \
|
||||
}
|
||||
|
||||
void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds)
|
||||
void kuznyechik_encrypt_block_simd(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds)
|
||||
{
|
||||
const uint_64t *roundKeys_ = (const uint_64t *) kds->rke;
|
||||
__m128i data_;
|
||||
|
@ -9200,7 +9200,7 @@ void kuznyechik_encrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kd
|
|||
_mm_storeu_si128((__m128i*) out, data_);
|
||||
}
|
||||
|
||||
void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds)
|
||||
void kuznyechik_encrypt_blocks_simd(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds)
|
||||
{
|
||||
const uint_64t *roundKeys_ = (const uint_64t *) kds->rke;
|
||||
__m128i data1_, data2_, data3_, data4_;
|
||||
|
@ -9347,7 +9347,7 @@ void kuznyechik_encrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
data4_ = _mm_xor_si128(data4_, cache11_); \
|
||||
}
|
||||
|
||||
void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kds)
|
||||
void kuznyechik_decrypt_block_simd(uint8_t* out, const uint8_t* in, kuznyechik_kds* kds)
|
||||
{
|
||||
const uint_64t *roundKeys_ = kds->rkd;
|
||||
__m128i data_;
|
||||
|
@ -9383,7 +9383,7 @@ void kuznyechik_decrypt_block_simd(byte* out, const byte* in, kuznyechik_kds* kd
|
|||
_mm_storeu_si128((__m128i*) out, data_);
|
||||
}
|
||||
|
||||
void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, kuznyechik_kds* kds)
|
||||
void kuznyechik_decrypt_blocks_simd(uint8_t* out, const uint8_t* in, size_t blocks, kuznyechik_kds* kds)
|
||||
{
|
||||
const uint_64t *roundKeys_ = kds->rkd;
|
||||
__m128i data1_, data2_,data3_,data4_;
|
||||
|
@ -9508,7 +9508,7 @@ void kuznyechik_decrypt_blocks_simd(byte* out, const byte* in, size_t blocks, ku
|
|||
kuznyechik_decrypt_block_simd (out, in, kds);
|
||||
}
|
||||
|
||||
void kuznyechik_set_key_simd(const byte* key, kuznyechik_kds *kds)
|
||||
void kuznyechik_set_key_simd(const uint8_t* key, kuznyechik_kds *kds)
|
||||
{
|
||||
scheduleEncryptionRoundKeysForGost15 (kds->rke, key);
|
||||
scheduleDecryptionRoundKeysForGost15 (kds->rkd, key);
|
||||
|
|
|
@ -214,10 +214,6 @@ ifeq "$(shell uname -s)" "Linux"
|
|||
else ifeq ($(GCC_VERSION), 408)
|
||||
# GCC version 4.8 supports C++11 features through the switch -std=c++11
|
||||
CXXFLAGS += -std=c++11
|
||||
else ifeq ($(shell expr $(GCC_VERSION) \>= 1100), 1)
|
||||
# GNU GCC version 11 and higher compile with -std=gnu++17 by default
|
||||
# which breaks "byte" definitions in Crypto++ library. So set -std=gnu++14 instead.
|
||||
CXXFLAGS += -std=gnu++14
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace VeraCrypt
|
|||
{
|
||||
}
|
||||
|
||||
void Cipher::DecryptBlock (byte *data) const
|
||||
void Cipher::DecryptBlock (uint8_t *data) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -57,7 +57,7 @@ namespace VeraCrypt
|
|||
Decrypt (data);
|
||||
}
|
||||
|
||||
void Cipher::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void Cipher::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -69,7 +69,7 @@ namespace VeraCrypt
|
|||
}
|
||||
}
|
||||
|
||||
void Cipher::EncryptBlock (byte *data) const
|
||||
void Cipher::EncryptBlock (uint8_t *data) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -77,7 +77,7 @@ namespace VeraCrypt
|
|||
Encrypt (data);
|
||||
}
|
||||
|
||||
void Cipher::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void Cipher::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -130,7 +130,7 @@ namespace VeraCrypt
|
|||
Initialized = true;
|
||||
}
|
||||
|
||||
void Cipher::EncryptBlockXTS (byte *data, uint64 length, uint64 startDataUnitNo) const
|
||||
void Cipher::EncryptBlockXTS (uint8_t *data, uint64 length, uint64 startDataUnitNo) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -138,7 +138,7 @@ namespace VeraCrypt
|
|||
EncryptXTS (data, length, startDataUnitNo);
|
||||
}
|
||||
|
||||
void Cipher::DecryptBlockXTS (byte *data, uint64 length, uint64 startDataUnitNo) const
|
||||
void Cipher::DecryptBlockXTS (uint8_t *data, uint64 length, uint64 startDataUnitNo) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -155,7 +155,7 @@ namespace VeraCrypt
|
|||
|
||||
|
||||
// AES
|
||||
void CipherAES::Decrypt (byte *data) const
|
||||
void CipherAES::Decrypt (uint8_t *data) const
|
||||
{
|
||||
#ifdef TC_AES_HW_CPU
|
||||
if (IsHwSupportAvailable())
|
||||
|
@ -165,7 +165,7 @@ namespace VeraCrypt
|
|||
aes_decrypt (data, data, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx)));
|
||||
}
|
||||
|
||||
void CipherAES::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherAES::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -187,7 +187,7 @@ namespace VeraCrypt
|
|||
Cipher::DecryptBlocks (data, blockCount);
|
||||
}
|
||||
|
||||
void CipherAES::Encrypt (byte *data) const
|
||||
void CipherAES::Encrypt (uint8_t *data) const
|
||||
{
|
||||
#ifdef TC_AES_HW_CPU
|
||||
if (IsHwSupportAvailable())
|
||||
|
@ -197,7 +197,7 @@ namespace VeraCrypt
|
|||
aes_encrypt (data, data, (aes_encrypt_ctx *) ScheduledKey.Ptr());
|
||||
}
|
||||
|
||||
void CipherAES::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherAES::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -219,17 +219,17 @@ namespace VeraCrypt
|
|||
Cipher::EncryptBlocks (data, blockCount);
|
||||
}
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
void CipherAES::EncryptXTS (byte *data, uint64 length, uint64 startDataUnitNo) const
|
||||
void CipherAES::EncryptXTS (uint8_t *data, uint64 length, uint64 startDataUnitNo) const
|
||||
{
|
||||
xts_encrypt (data, data, length, startDataUnitNo, (aes_encrypt_ctx *) ScheduledKey.Ptr());
|
||||
}
|
||||
|
||||
void CipherAES::DecryptXTS (byte *data, uint64 length, uint64 startDataUnitNo) const
|
||||
void CipherAES::DecryptXTS (uint8_t *data, uint64 length, uint64 startDataUnitNo) const
|
||||
{
|
||||
xts_decrypt (data, data, length, startDataUnitNo, (aes_decrypt_ctx *) (ScheduledKey.Ptr() + sizeof (aes_encrypt_ctx)));
|
||||
}
|
||||
|
||||
void CipherAES::SetCipherKeyXTS (const byte *key)
|
||||
void CipherAES::SetCipherKeyXTS (const uint8_t *key)
|
||||
{
|
||||
if (xts_encrypt_key256 (key, (aes_encrypt_ctx *) ScheduledKey.Ptr()) != EXIT_SUCCESS)
|
||||
throw CipherInitError (SRC_POS);
|
||||
|
@ -261,7 +261,7 @@ namespace VeraCrypt
|
|||
#endif
|
||||
}
|
||||
|
||||
void CipherAES::SetCipherKey (const byte *key)
|
||||
void CipherAES::SetCipherKey (const uint8_t *key)
|
||||
{
|
||||
if (aes_encrypt_key256 (key, (aes_encrypt_ctx *) ScheduledKey.Ptr()) != EXIT_SUCCESS)
|
||||
throw CipherInitError (SRC_POS);
|
||||
|
@ -272,12 +272,12 @@ namespace VeraCrypt
|
|||
|
||||
#ifndef WOLFCRYPT_BACKEND
|
||||
// Serpent
|
||||
void CipherSerpent::Decrypt (byte *data) const
|
||||
void CipherSerpent::Decrypt (uint8_t *data) const
|
||||
{
|
||||
serpent_decrypt (data, data, ScheduledKey);
|
||||
}
|
||||
|
||||
void CipherSerpent::Encrypt (byte *data) const
|
||||
void CipherSerpent::Encrypt (uint8_t *data) const
|
||||
{
|
||||
serpent_encrypt (data, data, ScheduledKey);
|
||||
}
|
||||
|
@ -287,12 +287,12 @@ namespace VeraCrypt
|
|||
return 140*4;
|
||||
}
|
||||
|
||||
void CipherSerpent::SetCipherKey (const byte *key)
|
||||
void CipherSerpent::SetCipherKey (const uint8_t *key)
|
||||
{
|
||||
serpent_set_key (key, ScheduledKey);
|
||||
}
|
||||
|
||||
void CipherSerpent::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherSerpent::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -308,7 +308,7 @@ namespace VeraCrypt
|
|||
Cipher::EncryptBlocks (data, blockCount);
|
||||
}
|
||||
|
||||
void CipherSerpent::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherSerpent::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -343,12 +343,12 @@ namespace VeraCrypt
|
|||
|
||||
|
||||
// Twofish
|
||||
void CipherTwofish::Decrypt (byte *data) const
|
||||
void CipherTwofish::Decrypt (uint8_t *data) const
|
||||
{
|
||||
twofish_decrypt ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *)data, (unsigned int *)data);
|
||||
}
|
||||
|
||||
void CipherTwofish::Encrypt (byte *data) const
|
||||
void CipherTwofish::Encrypt (uint8_t *data) const
|
||||
{
|
||||
twofish_encrypt ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *)data, (unsigned int *)data);
|
||||
}
|
||||
|
@ -358,12 +358,12 @@ namespace VeraCrypt
|
|||
return TWOFISH_KS;
|
||||
}
|
||||
|
||||
void CipherTwofish::SetCipherKey (const byte *key)
|
||||
void CipherTwofish::SetCipherKey (const uint8_t *key)
|
||||
{
|
||||
twofish_set_key ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *) key);
|
||||
}
|
||||
|
||||
void CipherTwofish::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherTwofish::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -375,7 +375,7 @@ namespace VeraCrypt
|
|||
#endif
|
||||
}
|
||||
|
||||
void CipherTwofish::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherTwofish::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -397,12 +397,12 @@ namespace VeraCrypt
|
|||
}
|
||||
|
||||
// Camellia
|
||||
void CipherCamellia::Decrypt (byte *data) const
|
||||
void CipherCamellia::Decrypt (uint8_t *data) const
|
||||
{
|
||||
camellia_decrypt (data, data, ScheduledKey.Ptr());
|
||||
}
|
||||
|
||||
void CipherCamellia::Encrypt (byte *data) const
|
||||
void CipherCamellia::Encrypt (uint8_t *data) const
|
||||
{
|
||||
camellia_encrypt (data, data, ScheduledKey.Ptr());
|
||||
}
|
||||
|
@ -412,12 +412,12 @@ namespace VeraCrypt
|
|||
return CAMELLIA_KS;
|
||||
}
|
||||
|
||||
void CipherCamellia::SetCipherKey (const byte *key)
|
||||
void CipherCamellia::SetCipherKey (const uint8_t *key)
|
||||
{
|
||||
camellia_set_key (key, ScheduledKey.Ptr());
|
||||
}
|
||||
|
||||
void CipherCamellia::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherCamellia::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -429,7 +429,7 @@ namespace VeraCrypt
|
|||
#endif
|
||||
}
|
||||
|
||||
void CipherCamellia::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherCamellia::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -451,12 +451,12 @@ namespace VeraCrypt
|
|||
}
|
||||
|
||||
// Kuznyechik
|
||||
void CipherKuznyechik::Decrypt (byte *data) const
|
||||
void CipherKuznyechik::Decrypt (uint8_t *data) const
|
||||
{
|
||||
kuznyechik_decrypt_block (data, data, (kuznyechik_kds *) ScheduledKey.Ptr());
|
||||
}
|
||||
|
||||
void CipherKuznyechik::Encrypt (byte *data) const
|
||||
void CipherKuznyechik::Encrypt (uint8_t *data) const
|
||||
{
|
||||
kuznyechik_encrypt_block (data, data, (kuznyechik_kds *) ScheduledKey.Ptr());
|
||||
}
|
||||
|
@ -466,11 +466,11 @@ namespace VeraCrypt
|
|||
return KUZNYECHIK_KS;
|
||||
}
|
||||
|
||||
void CipherKuznyechik::SetCipherKey (const byte *key)
|
||||
void CipherKuznyechik::SetCipherKey (const uint8_t *key)
|
||||
{
|
||||
kuznyechik_set_key (key, (kuznyechik_kds *) ScheduledKey.Ptr());
|
||||
}
|
||||
void CipherKuznyechik::EncryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherKuznyechik::EncryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
@ -486,7 +486,7 @@ namespace VeraCrypt
|
|||
Cipher::EncryptBlocks (data, blockCount);
|
||||
}
|
||||
|
||||
void CipherKuznyechik::DecryptBlocks (byte *data, size_t blockCount) const
|
||||
void CipherKuznyechik::DecryptBlocks (uint8_t *data, size_t blockCount) const
|
||||
{
|
||||
if (!Initialized)
|
||||
throw NotInitialized (SRC_POS);
|
||||
|
|
Loading…
Reference in New Issue