Skip to content

Commit

Permalink
TrueCrypt Source Version 2.1a
Browse files Browse the repository at this point in the history
  • Loading branch information
Truecrypt Foundation authored and FreeApophis committed May 29, 2014
1 parent f9b325a commit be52931
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 662 deletions.
4 changes: 0 additions & 4 deletions Common/CRYPTO.C
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ get_key_size (int cipher)
{
if (cipher == DES56)
return 7;
else if (cipher == IDEA)
return 16;
else if (cipher == BLOWFISH)
return 56;
else if (cipher == AES)
Expand All @@ -80,8 +78,6 @@ get_cipher_name (int cipher)
return "Blowfish";
if (cipher == AES)
return "AES";
else if (cipher == IDEA)
return "IDEA";
else if (cipher == DES56)
return "DES";
else if (cipher == TRIPLEDES)
Expand Down
10 changes: 2 additions & 8 deletions Common/CRYPTO.H
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,15 @@
#define BLOWFISH 1
#define AES 2
#define CAST 3
#define IDEA 4
#define TRIPLEDES 5
#define TRIPLEDES 4
#define DES56 100 // Used only for DES test vectors

#define LAST_CIPHER_ID 5 // Last cipher used for volume encryption
#define LAST_CIPHER_ID 4 // Last cipher used for volume encryption

// Length in bytes of the longest key used by encryption algorithms
#define MAX_CIPHER_KEY 56 // Blowfish 448 bits

/* Length of scheduled keys */
#define IDEA_KS 104
#define DES_KS 128
#define TRIPLEDES_KS (DES_KS*3)
#define BLOWFISH_KS 4168
Expand All @@ -63,7 +61,6 @@
#include "des.h"
#include "blowfish.h"
#include "aes.h"
#include "idea.h"
#include "cast.h"
#include "sha1.h"
#include "rmd160.h"
Expand Down Expand Up @@ -104,7 +101,6 @@ typedef struct CRYPTO_INFO_t
{\
if (cipher == BLOWFISH) BF_decrypt ((void *) data, (void *) ks); \
else if (cipher == AES) aes_decrypt ((void *) data, (void *) data, (void *)((char *)(ks)+sizeof(aes_encrypt_ctx))); \
else if (cipher == IDEA) ideaCrypt ((void *) data,(void *) data, (void *) ((char *) ks + IDEA_KS)); \
else if (cipher == DES56) des_encrypt ((void *) data, (void *) ks, 0); \
else if (cipher == CAST) CAST_ecb_encrypt((void *) data,(void *) data,(void*)ks,0); \
else if (cipher == TRIPLEDES) des_ecb3_encrypt ((void *) data,(void *) data, (void *) ks, \
Expand All @@ -115,7 +111,6 @@ typedef struct CRYPTO_INFO_t
{\
if (cipher == BLOWFISH) BF_encrypt ((void *) data, (void *) ks); \
else if (cipher == AES) aes_encrypt ((void *) data, (void *) data, (void *) ks); \
else if (cipher == IDEA) ideaCrypt ((void *) data, (void *) data, (void *) ks); \
else if (cipher == DES56) des_encrypt ((void *) data, (void *) ks, 1); \
else if (cipher == CAST) CAST_ecb_encrypt((void *) data,(void *) data,(void*)ks,1); \
else if (cipher == TRIPLEDES) des_ecb3_encrypt ((void *) data,(void *) data, (void *) ks, \
Expand All @@ -126,7 +121,6 @@ typedef struct CRYPTO_INFO_t
{\
if (cipher == BLOWFISH) BF_set_key ((void*)ks, 56, (void*) (key)); \
else if (cipher == AES) {aes_encrypt_key((void*)(key), 32, (void*)ks); aes_decrypt_key((void*)(key), 32, (void*)((char *)(ks)+sizeof(aes_encrypt_ctx)));} \
else if (cipher == IDEA) ideaExpandKey ((void*) (key), (void*)ks, (void *) ((char *) ks + IDEA_KS)); \
else if (cipher == DES56) des_key_sched ((void*) (key), (void*)ks); \
else if (cipher == CAST) CAST_set_key((void*)ks, 16, (void*)(key)); \
else if (cipher == TRIPLEDES) { \
Expand Down
15 changes: 8 additions & 7 deletions Common/Common.rc
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,21 @@ BEGIN
LTEXT "Portions of this software are based in part on the works of the following people:",
IDC_STATIC,18,122,256,8
LTEXT "Contact: ",IDT_ABOUT_MAILTO,185,87,104,8,NOT WS_VISIBLE
LTEXT "Bruce Schneier, Eric Young, Peter Gutmann, Xuejia Lai, James Massey,",
IDC_STATIC,18,130,226,8
LTEXT "Walt Tuchmann, Whitfield Diffie, Martin Hellman, Don Coppersmith,",
IDC_STATIC,18,138,218,8
LTEXT "Horst Feistel, Carlisle Adams, Stafford Tavares, and others.",
IDC_STATIC,18,146,195,8
LTEXT "Bruce Schneier, Horst Feistel, Don Coppersmith, Whitfield Diffie, Martin",
IDC_STATIC,18,130,260,8
LTEXT "Hellman, Walt Tuchmann, Carlisle Adams, Stafford Tavares, Eric Young,",
IDC_STATIC,18,138,257,8
LTEXT "Peter Gutmann, and many others.",IDC_STATIC,18,146,235,
8
CONTROL 1011,IDC_ABOUT_IMG,"Static",SS_BITMAP,0,0,293,49,
WS_EX_STATICEDGE
LTEXT "TrueCrypt x.x",IDT_ABOUT_VERSION,18,61,117,8
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,167,291,1,
WS_EX_STATICEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,169,291,1,
WS_EX_STATICEDGE
LTEXT "www.google.com",ID_WEBSITE,18,87,79,8,SS_NOTIFY
LTEXT "Released October 1, 2004",ID_WEBSITE,18,87,96,8,
SS_NOTIFY
END

IDD_COMMANDHELP_DLG DIALOGEX 0, 0, 272, 146
Expand Down
9 changes: 0 additions & 9 deletions Common/DLGCODE.C
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
char szTmp[32];

SetDefaultUserFont (hwndDlg);
SendMessage (GetDlgItem (hwndDlg, ID_WEBSITE), WM_SETFONT, (WPARAM) hUserUnderlineFont, 0);
SendMessage (GetDlgItem (hwndDlg, IDT_ABOUT_VERSION), WM_SETFONT, (WPARAM) hUserBoldFont, 0);

sprintf (szTmp, "TrueCrypt %s", VERSION_STRING);
Expand All @@ -284,14 +283,6 @@ AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
return 1;
}

if (lw == ID_WEBSITE)
{
ArrowWaitCursor ();
ShellExecute (NULL, "open", "http://www.google.com/search?q=truecrypt", NULL, NULL, SW_SHOWNORMAL);
Sleep (200);
NormalCursor ();
return 1;
}
return 0;

case WM_CLOSE:
Expand Down
2 changes: 1 addition & 1 deletion Common/TCDEFS.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
release. Please see the file license.txt for full license details. */

// Version displayed to user
#define VERSION_STRING "2.1"
#define VERSION_STRING "2.1a"

// Version number to compare against driver
#define VERSION_NUM 0x0210
Expand Down
9 changes: 0 additions & 9 deletions Crypto/Crypto.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@
<File
RelativePath=".\Ecb3_enc.c">
</File>
<File
RelativePath=".\Idea.c">
</File>
<File
RelativePath=".\Idea_386.c">
</File>
<File
RelativePath=".\Rmd160.c">
</File>
Expand Down Expand Up @@ -192,9 +186,6 @@
<File
RelativePath=".\Des_locl.h">
</File>
<File
RelativePath=".\Idea.h">
</File>
<File
RelativePath=".\Podd.h">
</File>
Expand Down
208 changes: 0 additions & 208 deletions Crypto/IDEA.C

This file was deleted.

21 changes: 0 additions & 21 deletions Crypto/IDEA.H

This file was deleted.

Loading

0 comments on commit be52931

Please sign in to comment.