Bitcoin Forum
December 09, 2016, 05:46:22 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: TrueCrypt Hardware RNG  (Read 1200 times)
ctoon6
Sr. Member
****
Offline Offline

Activity: 350



View Profile
July 26, 2011, 05:23:04 AM
 #1

Is there such a thing? A hardware random number generator that can be used with truecrypt, or a way to import raw random data.

1481305582
Hero Member
*
Offline Offline

Posts: 1481305582

View Profile Personal Message (Offline)

Ignore
1481305582
Reply with quote  #2

1481305582
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481305582
Hero Member
*
Offline Offline

Posts: 1481305582

View Profile Personal Message (Offline)

Ignore
1481305582
Reply with quote  #2

1481305582
Report to moderator
1481305582
Hero Member
*
Offline Offline

Posts: 1481305582

View Profile Personal Message (Offline)

Ignore
1481305582
Reply with quote  #2

1481305582
Report to moderator
1481305582
Hero Member
*
Offline Offline

Posts: 1481305582

View Profile Personal Message (Offline)

Ignore
1481305582
Reply with quote  #2

1481305582
Report to moderator
hugolp
Hero Member
*****
Offline Offline

Activity: 742



View Profile
July 26, 2011, 05:24:55 AM
 #2

Is there such a thing? A hardware random number generator that can be used with truecrypt, or a way to import raw random data.

I have that hardware here right by me. Just tell me how long do you want the number to be and for a low fee I will provide you with a trully 100% guarantee random number. Wink
ctoon6
Sr. Member
****
Offline Offline

Activity: 350



View Profile
July 26, 2011, 05:27:58 AM
 #3

yeah but how do you use it with truecrypt, i can make my own easily enough

theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
July 26, 2011, 07:17:46 AM
 #4

TrueCrypt uses the system's random number generation facility, so on Linux you can just write to /dev/random.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
ctoon6
Sr. Member
****
Offline Offline

Activity: 350



View Profile
July 26, 2011, 07:46:05 AM
 #5

So i can assume that truecrypt does not have any functionality built in to import a file with random data.

JoelKatz
Legendary
*
Offline Offline

Activity: 1386


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 26, 2011, 08:02:51 AM
 #6

Is there such a thing? A hardware random number generator that can be used with truecrypt, or a way to import raw random data.
On Windows, TrueCrypt imports entropy from the system RNG. So long as your hardware RNG pushes entropy into the system pool. TrueCrypt will use it.

Per http://www.truecrypt.org/docs/?s=random-number-generator
"The pool, which is 320 bytes long, is filled with data from the following sources:  ... MS Windows only: MS Windows CryptoAPI (collected regularly at 500-ms interval)"

The MS Windows CryptoAPI source produces cryptographically-strong random numbers even without a hardware RNG. It is designed for exactly this purpose. TrueCrypt uses other sources as well just in case there's some defect in CryptoAPI (and to be assured of similar security properties across platforms), but no defect is known or suspected.

If you'd like to add randomness to the system source, you can easily do so, and TrueCrypt will get it. Just pass it to 'CryptGenRandom' as the auxiliary seed. If the file is large, you may just wish to pass a hash of it. I don't think there is any benefit to doing this, but you certainly can if you wish. Here's the basic code:

bool TradeEntropy(void *ptr, int len)
{ // Exchange some entropy with the CryptoAPI
 char namebuf[512];
 DWORD count = 500;
 
 HCRYPTPROV handle;
 
 if(!CryptGetDefaultProvider(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT,
                             namebuf, &count))
   // unable to get default provider
  return false;
 
 if(!CryptAcquireContext(&handle, NULL, namebuf, PROV_RSA_FULL,
                         CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
  // Unable to acquire provider
  return false;

 if(!CryptGenRandom(handle, len, (BYTE *) ptr))
 { // Could not exchange entropy
  CryptReleaseContext(handle, 0);
  return false;
 }
 
 CryptReleaseContext(handle, 0);
 return true;
}

I am an employee of Ripple.
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
July 26, 2011, 08:04:08 AM
 #7

So i can assume that truecrypt does not have any functionality built in to import a file with random data.

I'm pretty sure there is no such function.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!