Bitcoin Forum
November 16, 2024, 08:43:50 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: TrueCrypt Hardware RNG  (Read 1404 times)
ctoon6 (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



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.

hugolp
Legendary
*
Offline Offline

Activity: 1148
Merit: 1001


Radix-The Decentralized Finance Protocol


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


               ▄████████▄
               ██▀▀▀▀▀▀▀▀
              ██▀
             ███
▄▄▄▄▄       ███
██████     ███
    ▀██▄  ▄██
     ▀██▄▄██▀
       ████▀
        ▀█▀
The Radix DeFi Protocol is
R A D I X

███████████████████████████████████

The Decentralized

Finance Protocol
Scalable
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
██                   ██
██                   ██
████████████████     ██
██            ██     ██
██            ██     ██
██▄▄▄▄▄▄      ██     ██
██▀▀▀▀██      ██     ██
██    ██      ██     
██    ██      ██
███████████████████████

███
Secure
      ▄▄▄▄▄
    █████████
   ██▀     ▀██
  ███       ███

▄▄███▄▄▄▄▄▄▄███▄▄
██▀▀▀▀▀▀▀▀▀▀▀▀▀██
██             ██
██             ██
██             ██
██             ██
██             ██
██    ███████████

███
Community Driven
      ▄█   ▄▄
      ██ ██████▄▄
      ▀▀▄█▀   ▀▀██▄
     ▄▄ ██       ▀███▄▄██
    ██ ██▀          ▀▀██▀
    ██ ██▄            ██
   ██ ██████▄▄       ██▀
  ▄██       ▀██▄     ██
  ██▀         ▀███▄▄██▀
 ▄██             ▀▀▀▀
 ██▀
▄██
▄▄
██
███▄
▀███▄
 ▀███▄
  ▀████
    ████
     ████▄
      ▀███▄
       ▀███▄
        ▀████
          ███
           ██
           ▀▀

███
Radix is using our significant technology
innovations to be the first layer 1 protocol
specifically built to serve the rapidly growing DeFi.
Radix is the future of DeFi
█████████████████████████████████████

   ▄▄█████
  ▄████▀▀▀
  █████
█████████▀
▀▀█████▀▀
  ████
  ████
  ████

Facebook

███

             ▄▄
       ▄▄▄█████
  ▄▄▄███▀▀▄███
▀▀███▀ ▄██████
    █ ███████
     ██▀▀▀███
           ▀▀

Telegram

███

▄      ▄███▄▄
██▄▄▄ ██████▀
████████████
 ██████████▀
   ███████▀
 ▄█████▀▀

Twitter

██████

...Get Tokens...
ctoon6 (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



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: 5390
Merit: 13426


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 (OP)
Sr. Member
****
Offline Offline

Activity: 350
Merit: 251



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: 1596
Merit: 1012


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. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5390
Merit: 13426


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!