Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kmfkewm

Pages: 1 ... 3 4 [5] 6 7 ... 249
61
There is no such thing as more high quality than a real note. The goal of counterfeit money is to pass as real money. If it is "better" than real money it can be told apart. Man made diamonds are less flawed than real diamonds, and this lets them be identified by skilled jewelers. Supernote can be identified as well, but only by top experts after very careful examination. Very unlikely this guy has supernotes if his bank identified them.

62
Philosophy, Economics and Justice / Re: Why I abandonded Libertarianism
« on: September 17, 2013, 11:20 pm »
Libertarianism is a white man's ideology.  there's no way in fucking hell you could explain that to the average black man and get him on board.  in his ears he's hearing "lets completely abandon the people who built this country (africans) and allow the klan to run wild.  if you don't want to live in squalor, all you have to do is beat your way to the top of the white man's world with no laws against discrimination."

I thought that black people would be cool with freeing all of the drug prisoners etc. Black people are highly negatively affected by things libertarians want to legalize, even more so than white people. Everybody gets something in libertarianism. The rich people get freedom from taxation and the poor people get freedom from prosecution for victimless crimes. Sure, there should be no laws against discrimination. If people don't like discrimination they wont buy products from companies that are known to discriminate, etc. The market can deal with issues like this very well.

Black people tend to be more anarcho-socialist than anarcho-capitalist though. They want to free the drug prisoners still, but want to steal money from the rich. Anarcho capitalism doesn't play favorites for any race or socioeconomic status, it blindly grants freedom to everybody. I am sure there are some black libertarians though, hell there are black republicans. So it isn't so much a race issue but really more of a socioeconomic issue. Poor people largely are not gonna want to be told they cannot steal from the rich. But it doesn't matter, cuz totalibertarians are not going to let them steal from the rich any more than they are going to let the rich build prison empires filled with poor people

63
Quote
Actually, it's my understanding of quantum-cryptography that what happens is that the message is transmitted in such a way that if it's intercepted or interfered with en route that quantum interference will make it unreadable, or at least alert the recipient that the message was intercepted. That said, I just took a look at the wiki page and there seem to be several theoretical cryptographic techniques all under the banner of 'quantum cryptography'....

Quantum cryptography is any cryptography that is based on the laws of quantum physics. The two most popular techniques used are quantum teleportation based systems (which is the direction China seems to be going), and quantum uncertainty based systems (which is the route the US seems to be going). Quantum teleportation uses entanglement to 'teleport' information from point A to point B, such that it never passes through any other points. The quantum uncertainty based systems transmit data from point A to point B such that it cannot be intercepted at any of the points in between without the interception being immediately detected by the people at point A and B. So with quantum teleportation you would teleport a symmetric key from point A to B and then use that to encrypt data which you transmit over the line as normal (or you might be able to teleport the entire plaintext), with quantum uncertainty based systems you would transmit the keying material and if you detect an interception you would generate new keying material and try again (perhaps after finding where the interception was carried out on the line, and capturing the enemy spies trying to steal your information). In either case you can do key exchange without the threat of interception, either because interception is impossible or because interception is impossible to do without it being immediately detected. There are probably other quantum encryption systems as well but these two are the most popular by far.

Quote
Ok, I'm not sure I made myself entirely clear. Even IF (big IF) they had a quantum processor (and I'm even more doubtful now I've read GGGreenbud's comments above re q-bits vs qubits - Shor's algorithm does require actual quantum entangled bits, not just some fancy finessing and high-level emulation.

Technically classical computers can do anything quantum computers can do, but it is only theoretically because you would need so many classical computers they would form a black hole before you got the power of a much smaller quantum computer.

Quote
I will be following up that train of thought) and it could decrypt messages in 'real time', it would still be a far-less-than-trivial endeavor to actually decrypt everything. The D-Wave2 (which couldn't do it anyhow) is a super-cooled 10m box. There are actual physical limits to the resources they could possibly command. Long before it gets to the point that they could decrypt everything in real-time better, quantum-proof, cryptography will HAVE to come along because you can bet some scumbag fraudster is gonna get hold of a quantum box and banks need security. And, again, they cannot even review all the un-encrypted data they have now - the bottle neck is not a technological one, it's a human-resources one.... So, they may or may not be able to do it now or in the near future, but it's only useful for ensuring they get digital evidence post hoc, not that useful for catching you in the first place. But if you're so in their sights that they will spend precious time using a multi-billion$$$$ super-cooled 10m^3 quantum box to decrypt your data you are already fucked...

yeah pretty much

64
looks like Truecrypt uses the same hash functions for their PBKDF as well

Quote
Header key is used to encrypt and decrypt the encrypted area of the TrueCrypt volume header (for system encryption, of the keydata area), which contains the master key and other data (see the sections Encryption Scheme and TrueCrypt Volume Format Specification). In volumes created by TrueCrypt 5.0 or later (and for system encryption), the area is encrypted in XTS mode (see the section Modes of Operation). The method that TrueCrypt uses to generate the header key and the secondary header key (XTS mode) is PBKDF2, specified in PKCS #5 v2.0; see [7].

512-bit salt is used, which means there are 2512 keys for each password. This significantly decreases vulnerability to 'off-line' dictionary/'rainbow table' attacks (pre-computing all the keys for a dictionary of passwords is very difficult when a salt is used) [7]. The salt consists of random values generated by the TrueCrypt random number generator during the volume creation process. The header key derivation function is based on HMAC-SHA-512, HMAC-RIPEMD-160, or HMAC-Whirlpool (see [8, 9, 20, 22]) – the user selects which. The length of the derived key does not depend on the size of the output of the underlying hash function. For example, a header key for the AES-256 cipher is always 256 bits long even if HMAC-RIPEMD-160 is used (in XTS mode, an additional 256-bit secondary header key is used; hence, two 256-bit keys are used for AES-256 in total). For more information, refer to [7]. 1000 iterations (or 2000 iterations when HMAC-RIPEMD-160 is used as the underlying hash function) of the key derivation function have to be performed to derive a header key, which increases the time necessary to perform an exhaustive search for passwords (i.e., brute force attack) [7].

Header keys used by ciphers in a cascade are mutually independent, even though they are derived from a single password (to which keyfiles may have been applied). For example, for the AES-Twofish-Serpent cascade, the header key derivation function is instructed to derive a 768-bit encryption key from a given password (and, for XTS mode, in addition, a 768-bit secondary header key from the given password). The generated 768-bit header key is then split into three 256-bit keys (for XTS mode, the secondary header key is split into three 256-bit keys too, so the cascade actually uses six 256-bit keys in total), out of which the first key is used by Serpent, the second key is used by Twofish, and the third by AES (in addition, for XTS mode, the first secondary key is used by Serpent, the second secondary key is used by Twofish, and the third secondary key by AES). Hence, even when an adversary has one of the keys, he cannot use it to derive the other keys, as there is no feasible method to determine the password from which the key was derived (except for brute force attack mounted on a weak password).

I would be hesitant to go that route personally because of concerns due to entropy diffusion (I used to say distribution but seems everybody calls it diffusion so time to switch my terminology. Diffusion = the input entropy is evenly distributed throughout the output) from the hash function.

Some links and short quotes from them


Quote
A class of functions called "message digests," "cryptographic checksums," etc. have a number of useful properties. They are designed for producing digital signatures, integrity checks, and so on, and to do so in the face of an adversary who wants to forge one of these. Digesters are designed in Ron Rivest's words to be secure in that, "It is computationally infeasible to find two messages that hashed to the same value. No attack is more efficient than brute force." Thus, if we hash a series of random samples, it is not practical to learn what those samples were. Note that this is the same thing as my definition of the output's being perfectly random, and thus the hash preserves the entropy found in the samples. This has the additional useful effect that many weakly entropic samples can be combined to carry entropy equivalent to the whole of the entropy of all the samples. Note that while these hashes distill entropy, they cannot hold more entropy than their size. They are bottles that you can shake up entropy in, but a 128-bit hash cannot hold 129 bits worth of entropy.

These characteristics make them excellent functions for our purposes. Common functions used today are MD2, MD4, and MD5 (done by Ron Rivest), SHA (the US government's Secure Hash Algorithm, also known as SHS, the Secure Hash Standard), GOST (the Russian hasher), RIPE-MD, and RIPE-MD160 (which are European standards for hashes).


www.iacr.org/archive/crypto2004/31520493/clean.pdf

Quote
    The tools used to derive a uniform key from these sources of imperfect ran-
domness are often referred to as randomness extractors. The amount of theo-
retical results in this area is impressive; moreover, some of the constructions
that have proven extraction guarantees are also efficient (see [Sha02] for a recent
survey). One such example is the so called “pairwise independent universal hash
functions” (also called ”strongly universal”) [CW79] which have quite efficient
implementations and provable extraction properties. In particular, [HILL99]
shows (see also [Lub96,Gol01]) that if an input distribution has sufficient min-
entropy (meaning that no single value is assigned a too-large probability even
though the distribution may be far from uniform) then hashing this input into a
(sufficiently) shorter output using a function chosen at random from a family of
strongly universal hash functions results in an output that is statistically-close
to uniform. (This result is often referred to as the “Leftover Hash Lemma”.)

Actually had some trouble digging up citations for these properties, I wish I could find the first thing I read when I first learned about cryptographic hash functions, it defined all of these properties. But hopefully these two quotes are enough to show my concern: the hash function distills randomness up to the maximum size of the output of the hash function, and it takes the possibly non-uniform randomness of the input and produces a uniformly random output. My concern about using SHA512 to produce a key for a 256 bit symmetric algorithm is that if only half of the output of SHA512 is used, perhaps only half of the randomness of the password is used, if the password contains less than 512 bits of entropy.

PBKDF2 doesn't XOR together bit pairs of the output, or take the SHA256 value of the output. It keeps running SHA512. So they really are keying AES-256 with partial output from SHA-512. I would love for someone to explain to me why entropy diffusion after hashing a password with less than 512 bits of entropy doesn't lead to a weakened key when half of the 512 output bits from the hash are used. I did ask about this in the past and someone said he would argue that using part of a SHA512 hash like this would be just as safe as using SHA256, but he didn't explain why or seem 100% certain. I would imagine it is safe or else there would be warnings about it with PBKDF2 or something I imagine, but to me it doesn't make sense.

If hashing an input uniformly distributes its entropy into the output, and the input has 256 bits of entropy, and the output has 512 bits, it seems that each bit of output has half a bit of entropy, and therefor taking 256 bits from this output to key AES-256 would have 128 bits of entropy only. Again, love for someone to explain to me why I am wrong (I wouldn't be surprised if I am, but I just don't see why), or explain to me why it is better to use half of a SHA512 hash versus just using a secure hash that produces the number of bits needed to key the symmetric algorithm in the first place.


In the case of using a hash function that produces less than 256 output bits I wouldn't see this concern, because the PBKDF can stretch the randomness of the password into an arbitrary length stream, but when using a hash function with more than 256 output bits it seems that although it can stretch the randomness of the password into pseudorandomness still, the entropy will still be diffused throughout the output bits (meaning with 256 bits of randomness in the password, you still have 256 bits of entropy in an arbitrary number of 512 bit outputs, but each of the output bits only has half a bit of entropy), which would seemingly cut the effective entropy of the password in half if it isn't enough to fill the limit of the hash function used (because 256 bits spread over 512 bits of output means each bit has half a bit of entropy, and when you use half of the final output to key the 256 bit algorithm, it means your key only has 128 bits of entropy. Or if your password has only 30 bits of entropy, the key has only 15 bits of entropy, since 30 bits of entropy diffused over 512 bits means each output bit has .05859375 bits of entropy, and .05859375 * 256 used bits = 15 bits of entropy). 

However even in the case of using a hash function with 160 bits of randomness, it seems that the limit of the security would be 160 bits. You can stretch a 160 bit seed out to an arbitrary length stream, but cracking the initial seed will always allow you to generate the entire stream. This is easy to prove, assume you have a single random bit, it is either 1 or 0. You can stretch this out indefinitely by hashing it with a counter for example, so:

H({1,0}) = O
H(O || 1) = O1
H(O1 || 2) = O2

but this only has 1 bit of security, because the attacker knows you either started with 1 or with 0. So I think you can stretch the initial entropic seed out indefinitely, but the total security of the system cannot be larger than the initial seed. So using a 160 bit hash function for the PBKDF to key a 256 bit algorithm means you cannot have more than 160 bit security.

So I am not sure how I feel about ANY of the hash functions that Truecrypt offers! Either we can use a 512 bit hash algorithm and diffusion of entropy will cut the effective keyspace of most passwords in half (it seems to me, please tell me why I am wrong), or we can use a 160 bit hash and the security of AES-256 is actually limited to 160 bits, since passwords with more than 160 bits of entropy don't contribute additional entropy to the PBKDF output . Why don't they include a 256 bit hashing algorithm??

65
Security / Re: Attack on BitMessage
« on: September 17, 2013, 04:58 am »
was destined to not scale from the day it was thought of. There have been years and years of research into making it so PIR scales, everybody gets everything is least scalable possible. BitMessage has problems from the bottom to the top, and some of the problems it used to have were so bad that it obviously wasn't made by people who have a clue what they are doing. Even now that they don't encrypt the entire message with RSA they still have tons of traffic analysis issues etc. Pretty much the problem area they are working in has had truck loads of research into it for the past fifty or so years and they obviously didn't read any of it. I learned the same lesson some years ago, don't try to invent your own secure communications system if you are not an expert, and you are probably not an expert if you don't have a Ph.D or at least masters degree in a related science, or if you have not spent 5-8 years researching on your own, while having a solid understanding of advanced math as well. There already are hundreds if not thousands of whitepapers out there from people who are experts on such things, if you want to make a system read their whitepapers and spend your efforts implementing them (which is hard enough in itself) and thinking of ways to make their systems work together (because a complete system for secure anonymous communications is going to involve several different parts, and each part will have its own whitepaper). The less that you need to invent yourself the better.

They took Bitcoin and tried to make it a message system, so they didn't totally reinvent the wheel. But they thought that everybody gets everything was a good idea for messaging systems to maintain anonymity, and theoretically it is, but having that thought without knowing what Private Information Retrieval is will lead to ignoring the fact that there are decades of research into having the same anonymity properties while using orders of magnitude less bandwidth.

66
Philosophy, Economics and Justice / Re: Jesus alien hybrid
« on: September 17, 2013, 04:34 am »
I really doubt that gladiators were castrated, that would tremendously (totally?) reduce their testosterone and make for some pretty feminine looking guys having chick fights.

67
Philosophy, Economics and Justice / Re: Why I abandonded Libertarianism
« on: September 17, 2013, 04:06 am »
Great information Hungry Ghost, and a +1 for sharing it.  After reading the previous criticism I felt obliged to at least read up on this Bonobo behavior mentioned (I'd not heard of this behavior, perhaps it was not menioned in the book I cited, or I've simply forgotten.  I'd read it some time ago). 

You saved me the research, thanks! 

I must say, those Bonobos are a randy lot aren't they!

You also deftly reiterated my point, that perhaps something can be gleened from primate behavior that could inform our approach to social structures.

R.

I agree! Oh you said deftly I thought you said daftly, never mind. I don't understand why you think humans, with our great intellects, should base our social structures on fucking apes, lol. I think when you first became a libertarian it was after reading the fountain head, and now you have just read Tarzan and changed your mind. Seriously, apes fling their shit around and have sex with infants, do you really think we should use them as a basis of how to arrange our social structures? There is no legitimacy at all to the claim "Apes are not organized as libertarians, and therefore humans should not be!" , and using that as your arguement just seems absurd.

68
According to an article  published on 9/5/13 in USAtoday.com  NSA spent  many billions building a supercomputer that can crack any and all encryption software  >:( After reading the article I wondered if its useless to encrypt??

OH EM GEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!!

Ok, the NSA have no such supercomputer because no kind of supercomputer can get round the P vs NP problem (and there may be no way around it, but no one knows right now). This would be a mathematical breakthrough MUCH larger than finding the Higgs Boson.

I have heard some people say that quantum computers imply that P = NP, although the fact that this isn't breaking news seems to indicate that perhaps the people researching quantum computers are full of shit. None of them seem to directly make such a claim, but some people take the claims they make to imply it. In computer science quantum computers are actually kind of controversial it seems to me. Traditional computer scientists seem to dismiss them in many cases, but perhaps it is just because they don't know enough about them. Even cryptographers used to dismiss them, but they seem to be more and more accepting of the fact that they are real now. I think that quantum computers kind of go beyond traditional computer science and more into the realm of advanced physics applied to computation. Certainly that is the case with quantum cryptography, which is very different from traditional cryptography and has a very physics oriented slant to it. (IE: Traditional cryptography you may scramble a plaintext and transmit it on the line, such that if it is intercepted it cannot be deciphered between location A and B. With quantum cryptography, you may use quantum teleportation to transfer a plaintext from point A to point B such that it does not exist at any point between A and B to be intercepted in the first place.)

On the other hand, I don't think it has ever been proven that prime factorization is NP-complete, so perhaps quantum computers theoretic ability to trivially factor massive numbers into primes doesn't imply that P = NP, but rather implies that prime factorization was never NP-complete to begin with. So just because a quantum computer can factor huge numbers into primes doesn't mean that there has been an answer to P vs NP, but is more likely to imply that some problems thought to be, but never proven to be, NP-complete, were actually never NP-complete to begin with.

Quote
What NSA have apparently done is weaken commercial encryption algorithms (usually by making the entropy generators less than random) so that they CAN break the encryption, but strong encryption is still strong. For instance, on a desktop pc it would take 6.4 quadrillion years to brute-force 2048bit RSA encryption. Working using conventional algorithms the D-Wave2 can compute problems 3600x faster (according to the wiki page - the only place I could find that had actual facts, no just glossy brochure crap), which still places it at taking 1.8 trillion years to brute force.

A true quantum computer with enough stabilized qubits is allegedly able to trivially break RSA and ECC and DH and most public key encryption. It is also allegedly able to cut the bit strength of a symmetric algorithm in half. It is true that right now it looks primarily like the NSA has subverted cryptography via influence over the standards as well as releasing some backdoored things, such as the PRNG dual_ec_drbg. However, the NSA is also very likely at the cutting edge of quantum computing, and that is a risk to take into account as well. On the other hand, the NSA is also at the cutting edge of traditional computing, and it is possible that their super computers are merely trying to brute force passwords and crack smaller traditional encryption keys (like RSA or DH 1,024).

Quote
Now, where quantum computers excel is in that they can execute Shor's algorithm - this can use unique properties of qubits to break encryption. Don't ask me how it works, I'm working on learning about this kind of thing, but am not that advanced yet. However, this is not just some kind of magic spell any old quantum processor can manage, there are requirements. For starters, the noise needs to be low enough, but let's assume that is for now. The main point is that you need enough qubits. 512 qubits is very respectible, but as far as I can tell you need more qubits than the number of bits in the encryption key. Most sources say twice as many, did find this which suggest RSA768 can be broken with 1154quibits - about 1.5x the bit of the encryption key:

CLEARNET
http://www.nature.com/nature/journal/v499/n7457/fig_tab/nature12290_T1.html

So, to crack a 2048bit RSA they would need around 3000+ qubits. 512qubits is respectible, but not enough.

Sounds right, nice source I have never been able to find exact numbers for how many qubits are required to break an X bit RSA key. On the other hand we should be a bit worried, because over the past few years the number of qubits in quantum computers has grown by two orders of magnitude already. If they keep up at this rate, and they only need 1.5 times as many qubits as RSA key has bits, they may be able to break even 4,096 bit RSA keys in the next couple of years.

Quote
The final point is this - even if they did have a black box that could do this, it still takes some time and resources each time. They can't just decrypt everything in real time, and even if they could they do not have the HuMint resoruces to interpret it in real-time. The more encryption used, and the better the encryption, the harder and more costly it is for them and the more they have to use discretion over who they target.

Shors algorithm can decrypt things in nearly real time. If a quantum computer exists that can crack RSA-X, it can crack RSA-X almost instantly.

69
Actually it looks like Truecrypt is using a similar system (I just read the entire thing, before I only glanced at it), but I don't know why they have made it so much more complicated.

Quote
Random Number Generator

The random number generator (RNG) is used to generate the master encryption key, the secondary key (XTS mode), salt, and keyfiles. It creates a pool of random values in RAM (memory). The pool, which is 320 bytes long, is filled with data from the following sources:

    Mouse movements

    Keystrokes

    Mac OS X and Linux: Values generated by the built-in RNG (both /dev/random and /dev/urandom)

    MS Windows: Windows CryptoAPI (collected regularly at 500-ms interval)

    MS Windows: Network interface statistics (NETAPI32)

    MS Windows: Various Win32 handles, time variables, and counters (collected regularly at 500-ms interval)

So essentially Truecrypt is describing the buffer from the scheme I mentioned, where raw input data is added (from mouse position, etc).

Quote
Before a value obtained from any of the above-mentioned sources is written to the pool, it is divided into individual bytes (e.g., a 32-bit number is divided into four bytes). These bytes are then individually written to the pool with the modulo 28 addition operation (not by replacing the old values in the pool) at the position of the pool cursor. After a byte is written, the pool cursor position is advanced by one byte. When the cursor reaches the end of the pool, its position is set to the beginning of the pool. After every 16th byte written to the pool, the pool mixing function is applied to the entire pool (see below).

Truecrypt diverges here, after they fill the buffer up they don't ever replace it but rather they modify it. When new input comes in after the buffer is filled, they change the value of the current position in the pool to be the current position in the pool modulo 28 the new raw input.

Quote
Pool Mixing Function

The purpose of this function is to perform diffusion [2]. Diffusion spreads the influence of individual "raw" input bits over as much of the pool state as possible, which also hides statistical relationships. After every 16th byte written to the pool, this function is automatically applied to the entire pool.

Description of the pool mixing function:

    Let R be the randomness pool.

    Let H be the hash function selected by the user (SHA-512, RIPEMD-160, or Whirlpool).

    l = byte size of the output of the hash function H (i.e., if H is RIPEMD-160, then l = 20; if H is SHA-512, l = 64)

    z = byte size of the randomness pool R   (320 bytes)

    q = z / l – 1    (e.g., if H is Whirlpool, then q = 4)

    R is divided into l-byte blocks B0...Bq.
    For 0 < i < q (i.e., for each block B) the following steps are performed:
        M = H (B0 || B1 || ... || Bq)    [i.e., the randomness pool is hashed using the hash function H, which produces a hash M]

        Bi = Bi ^ M
    R = B0 || B1 || ... || Bq

Now Truecrypt divides the buffer into sections that are the size of the output of the hash function selected by the user. Truecrypt goes through each section and generates a value that is equal to the hash value of every section in the buffer, and then uses modular exponentiation to transform the current section to the current section ^ value generated by the hash function. It does this for every section in the randomness pool.

Quote
For example, if q = 1, the randomness pool would be mixed as follows:

    (B0 || B1) = R

    B0 = B0 ^ H(B0 || B1)

    B1 = B1 ^ H(B0 || B1)

    R = B0 || B1


Quote
Generated Values

The content of the RNG pool is never directly exported (even when TrueCrypt instructs the RNG to generate and export a value). Thus, even if the attacker obtains a value generated by the RNG, it is infeasible for him to determine or predict (using the obtained value) any other values generated by the RNG during the session (it is infeasible to determine the content of the pool from a value generated by the RNG).

The RNG ensures this by performing the following steps whenever TrueCrypt instructs it to generate and export a value:

    Data obtained from some of the sources listed above is added to the pool as described above.

    The requested number of bytes is copied from the pool to the output buffer (the copying starts from the position of the pool cursor; when the end of the pool is reached, the copying continues from the beginning of the pool; if the requested number of bytes is greater than the size of the pool, no value is generated and an error is returned).

    The state of each bit in the pool is inverted (i.e., 0 is changed to 1, and 1 is changed to 0).

    Data obtained from some of the sources listed above is added to the pool as described above.

    The content of the pool is transformed using the pool mixing function. Note: The function uses a cryptographically secure one-way hash function selected by the user (for more information, see the section Pool Mixing Function above).

    The transformed content of the pool is XORed into the output buffer as follows:
        The output buffer write cursor is set to 0 (the first byte of the buffer).

        The byte at the position of the pool cursor is read from the pool and XORed into the byte in the output buffer at the position of the output buffer write cursor.

        The pool cursor position is advanced by one byte. If the end of the pool is reached, the cursor position is set to 0 (the first byte of the pool).

        The position of the output buffer write cursor is advanced by one byte.

        Steps b-d are repeated for each remaining byte of the output buffer (whose length is equal to the requested number of bytes).
    The content of the output buffer, which is the final value generated by the RNG, is exported.

Truecrypt then uses this randomness pool to generate keying material, first going through some steps to transform it a final time.


I think that this is kind of an over complicated method personally. I would do something more like this:

Have the buffer that raw input is added to, every period of time (or better yet every time the buffer is filled), I would take the SHA-256 value of the buffer. Then I would totally clear the buffer, and add the SHA-256 value to it. Then as more input comes, I would add it to the buffer past the SHA-256 value, and when the buffer is filled again I would take the SHA-256 value of it again. I would do this for some number of rounds, or as long as the user desires. At the end, I would take a final SHA-256 value of the buffer. If I was only generating an AES-256 key, I would use the final SHA-256 hash for the key. However, Truecrypt is using their PRNG to generate more than the key, so I would need more than 256 bits. In this case, I would do the following:

Using the final SHA-256 output as a seed, I would then hash it out once more. If S is the original value and O1 is the hash of the original value

Ox = H(S || Ox-1)

O1..Oz would be my pseudorandom material to use for keying and other operations, where Oz is the final Ox.

The original seed is generated securely because:

A. Cryptographic hash functions preserve entropy, meaning the output of H(X) contains as much entropy as X.

Therefore, with R = raw input

H(R1) = A
H(A || R2) = B
H(B || R3) = D

D must contain as much entropy as the total entropy of R1, R2, and R3 combined.

B. Cryptographic hash functions distill entropy

If H produces 256 bits of output, feeding H(1000 non-random-input-bits + 1 random-input-bit) = 256 bit output with 1 random bit (due to preservation of entropy there is 1 bit of entropy in the output, distilled from 1001 bits to 256 bits)

C. Cryptographic hash functions distribute entropy

If H produces 256 bits of output, H(1 bit of entropy) = 256 bits each with 1/256 bits of entropy

therefore if there are 256 bits of entropy total fed to H during the seed generation process, the final value will be 256 random bits.

The final output material is secure because:

A. The seed is used to generate every 32 bytes of output

Ox = H(S || Ox-1)

Without knowing the seed value an attacker cannot use Ox to determine Ox-1 or Ox+1, because a cryptographic hash algorithm is (ideally) a one way function.

H(S) = O1 (the attacker can not determine the seed from the first output because doing so would mean H is not a one way function)

H(S || O1) = O2 (Same as above, plus the attacker can not guess O2 with knowledge of O1 unless they also have knowledge of S, and S is 256 bits of randomness)

H(S || O2) = O3

etc.

It should be safe to use randomly sized sections of output as well, since the entropy is evenly distributed by the hash function. That means just because the hash outputs A9 and A is used for the publicly viewable salt and 9 is used for the secret key, the attacker should not be able to use knowledge of A to be able to determine that the key starts with 9, since the entropy of A is the same as the entropy of 9 and the two are probabilistically independent of each other.

70
But you can key AES-256 with partial output from SHA-512. You would just split the output in half. But might as well just use SHA-256. I believe it is also debatable if it would be safer to use SHA-512 or SHA-256. I have read some things indicating that SHA-256 would be safer, but one cryptographer I talked with said he would make the case that it is equally safe to use half a SHA-512 output as it is to use an entire SHA-256 output.

The thing is, cryptographic hash functions distill and evenly distribute randomness. At least, this is according to one thing I read a long time ago when I was first learning about cryptographic hashes, and I think it is true. So if you feed SHA-256 1 bit of entropy, the output 256 bits will have 1 bit of entropy evenly distributed through out them. This is the distributive property of cryptographic hash functions, the distillation property is that if you feed it 1000 bits of data which contain 1 bit of entropy, the output hash will have 1 bit of entropy in 256 bits of data. So if this is a correct understanding of cryptographic hash functions, it would seem that it would be safer to use SHA-256 to key AES-256, because let's say your password contains 256 bits of entropy. You feed the password to the hash function and the output hash has 256 bits of entropy. If you use SHA-512 and feed it a password with 256 bits of entropy, the output also has 256 bits of entropy, but now it is spread over 512 bits. When you take half of those bits to key AES-256, it would seem like you are only actually getting 128 bits of security, as each bit from the hash function has half a bit entropy due to the distributive property of cryptographic hash functions.

I am not sure if this happens in practice. From what I have read about cryptographic hashing functions, it seems like it should happen this way, and that it would be safer to use SHA-256 for the hash function to generate a key for AES-256. But like I said, one crytpographer said he would argue that both methods are equally secure.
SHA-512 is largely identical to SHA-256 isn't it?  but operates on 64-bit, thus there are some computation artifacts of SHA-512 that make cracking programs like hashcat harder to use with GPUs, giving you a slight advantage to not being at the mercy of GPU cloud hashing.

I don't know the specification of SHA-256 or SHA-512, but their output hashes are totally different for the same input. To protect from GPU cloud hashing attacks on password hashes you would use a PBKDF with a lot of iterations. Some GPU's can produce SHA-256 hashes really fast, particularly AMD GPU's, as explained below

https://en.bitcoin.it/wiki/Why_a_GPU_mines_faster_than_a_CPU#Why_are_AMD_GPUs_faster_than_Nvidia_GPUs.3F

Quote
Firstly, AMD designs GPUs with many simple ALUs/shaders (VLIW design) that run at a relatively low frequency clock (typically 1120-3200 ALUs at 625-900 MHz), whereas Nvidia's microarchitecture consists of fewer more complex ALUs and tries to compensate with a higher shader clock (typically 448-1024 ALUs at 1150-1544 MHz). Because of this VLIW vs. non-VLIW difference, Nvidia uses up more square millimeters of die space per ALU, hence can pack fewer of them per chip, and they hit the frequency wall sooner than AMD which prevents them from increasing the clock high enough to match or surpass AMD's performance. This translates to a raw ALU performance advantage for AMD:

    AMD Radeon HD 6990: 3072 ALUs x 830 MHz = 2550 billion 32-bit instruction per second
    Nvidia GTX 590: 1024 ALUs x 1214 MHz = 1243 billion 32-bit instruction per second

This approximate 2x-3x performance difference exists across the entire range of AMD and Nvidia GPUs. It is very visible in all ALU-bound GPGPU workloads such as Bitcoin, password bruteforcers, etc.

Secondly, another difference favoring Bitcoin mining on AMD GPUs instead of Nvidia's is that the mining algorithm is based on SHA-256, which makes heavy use of the 32-bit integer right rotate operation. This operation can be implemented as a single hardware instruction on AMD GPUs (BIT_ALIGN_INT), but requires three separate hardware instructions to be emulated on Nvidia GPUs (2 shifts + 1 add). This alone gives AMD another 1.7x performance advantage (~1900 instructions instead of ~3250 to execute the SHA-256 compression function).

so yeah GPU's are currently more specialized for SHA-256 than SHA-512. However, by using a PBKDF you can strengthen your password by much more than you can by switching from SHA-256 to SHA-512. PBKDF will use SHA-256 (or whatever) and iterate perhaps a hundred thousand times. So if using SHA-512 takes twice as much time for the GPU to make a hash, using SHA-256 with PBKDF with 100,000 iterations will take 100,000 times as long. Of course you could switch to SHA-512 with so many iterations, but you can always just add more to SHA-256 as well. There is no problem to make key generation from a password take X amount of time with Y hardware, and it is just as effective to use a PBKDF with more iterations as it is to switch to a new hashing algorithm.

Quote
No idea about ASIC or FPGA's though, I would assume they don't have this problem.

I don't think even GPU's have this problem theoretically, they are just not as optimized for SHA-512 as they are for SHA-256. Although it is probable that SHA-512 takes longer than SHA-256 inherently anyway, but as I said before you can use a PBKDF to make key generation take as long as you want on any given hardware.

Quote
All the encryption I've seen to make containers and the like, are using SHA-512 (Schneier also advocates SHA-512, but says there's nothing wrong with any SHA-2) while all the software implementations to use bcrypt/encrypt databases, are using sha256, probably to avoid that password spreading problem you talked about when feeding in passwords to avoid the 72 byte limit (though Password1 is now using 512)

What are they using them for though, is the important question. Also, how are they using them. It is literally impossible to use a 512 bit output for an AES-256 key, AES-256 needs a key that is exactly 256 bits. The only way you could use a SHA-512 hash for AES-256 is if you only use half of the output bits. In which case I would probably just use SHA-256, since it matches up. If I was using a password based key and wanted to make an attacker spend more time to guess passwords, I would use SHA-256 with a PBKDF with as many iterations as the user could stand. I am not positive if the entropy distribution problem actually will come into play, but from what I have read on hash functions I would be afraid that it would. A cryptographer friend said he would argue that both methods are equally as secure. I noted that he didn't say they are equally secure. I would therefore lean toward caution by using SHA-256 to key a 256 bit encryption algorithm, rather than using half the output bits of SHA-512.

Quote
Example:  $h=crypt(hash('sha256', $p),'$2y$......................');  bcrypt and scrypt make it really hard for GPUs to crack anyways. There's also this, which is a bcrypt 256 implementation to separate keys from server and encrypt the hashes as well http://sebsauvage.net/paste/?a99d7b619aa2a028#Ey6MdAyxEywI7JAox7afg7wBBSf0bh/qS6wnQ2MD1OU=

Meanwhile TC is using SHA-512, Whirlpool (512), and RIPEMD-160 hashes for AES256 keys.

Truecrypt uses those hash functions as part of its custom PRNG, it doesn't directly use them to produce keys. Truecrypt produces keying material with its PRNG, the hash functions it uses as entropy distributors (entropy diffusers they call them).

http://www.truecrypt.org/docs/random-number-generator

I can't really comment on the way their PRNG works. I would have done it a little bit differently, and more straight  forward imo. After getting the raw input from mouse position etc, I would concatenate it together into a single buffer every few seconds, then take the SHA-256 sum. Then I would take this SHA-256 sum and use it as the basis for the next round, with new raw input being concatenated to the previous SHA-256 sum, and then after a few seconds the new value being hashed, etc, for however long the user desires. Another property of a cryptographic hashing algorithm is that the output hash should contain exactly as much entropy as the input fed to it. So if I feed SHA-256 1000 bits that contain 1 bit of entropy, the output SHA-256 hash should have 1 bit of entropy. If I use this hash for the basis of the next output, and concatenate 1000 bits with 1 bit of randomness to it, when I hash this the next SHA-256 output should have 2 bits of entropy. At this rate, it will take 256 cycles to have 256 random bits. Then I would key AES-256 directly with this hash value.

Of course the hash value used to key AES-256 is not based on a password. Truecrypt generates a random key for AES-256 and then it encrypts this key with another key generated by the users password.

I wouldn't use SHA-512 because I would be too worried that the user would only accumulate 256 bits of entropy, and that they would be distributed evenly thoughout the 512 bit output, leading to the AES key only having 128 bits of entropy. Though I suppose you could use SHA-512 and XOR every pair of bits together to get a 256 bit key. Or you could take the SHA-256 value of the SHA-512 value. Using half of the SHA-512 value seems risky though. And I don't see a reason to use SHA-512 and then SHA-256 versus just using SHA-256 to begin with.

71
Security / Re: raided by cops, almost year after seized package
« on: September 17, 2013, 01:11 am »
A good reason to use fake ID boxes. If you have missing packs you can drop the box, then when they check up on it a year later it is registered to someone else and you are long gone.

72
Philosophy, Economics and Justice / Re: Why are laws not changing?
« on: September 17, 2013, 12:59 am »
Jack N Hoff - you are very correct in that - where would the DEA be if we changed these laws, What would the companies that build prisons do?  What would all the parole officers do? It almost seems that there is a sub economy in the USA that is built around just drugs and making sure that they make money for big government!!!

Slavery never died in the USA it has only changed the way it manifests itself. USA is a nation that is highly dependent on slavery.

73
Off topic / Re: kmfkewm RL Identity compromised ***LINK***
« on: September 17, 2013, 12:41 am »
Really it comes down to this:

Either the UK, USA and Australia are not as free as Germany when it comes to age of consent, or Germany is a nation of child abusers who have voted to legalize the sexual exploitation of minors. And not only Germany, but also Estonia, Japan, and many other countries. I am entirely in favor of freedom, I think people must have the maximum amount of freedom reasonable, and anybody who restricts the freedom of others is enslaving them. I hate people who enslave others, and I hate nations that enslave their citizens. I do not think that Germany, Estonia, or Japan are nations that are dominated by child abusers who want to legalize the rape and molestation of children, and thus I am left to conclude that the people in UK, USA, and Australia are being enslaved by their governments due to the age of consent being higher than it is in Germany. My desire is for the world to be as free as possible, this is not compatible with sending people to prison and labeling them sex offenders and ruining their lives for actions that are legal in Japan.

So do you think that you are a slave or do you think that Germany is a nation ruled by child abusers?

74
Off topic / Re: kmfkewm RL Identity compromised ***LINK***
« on: September 17, 2013, 12:25 am »
Why be so mad at me? I am just one person, I cannot do anything to change the fascist countries that imprison people for victimless crimes. Why not be mad at Japan or Russia or the other countries that allow people to legally view CP? Why not be mad at Germany or Italy or Estonia or any of the other countries that allow people to legally have sex with 14 year olds? Do you really think I am sick because I think Germany has a good age of consent system? Do you really think I am such a sick fuck for thinking Japan has the best CP laws? Anybody who disagrees with the law of your country is a sick fuck I take it. So are you a nationalist or what?

You think Germans all want to fuck 14 year olds (well, they probably mostly do, just like most men probably do, but whatever)? Or do you think they just don't want to criminalize behavior that doesn't cause harm to others? You think anyone who thinks weed should be legal is a pothead then? Do you think Germany and Estonia etc are nations ruled by child abusers who want to exploit children? Because they have laws that are in line with what I think the laws of the world should be, in regards to age of consent. You think I am a sick fuck because I think Germany has the best age of consent system, so it seems you think all Germans are sick fucks then.

75
Off topic / Re: kmfkewm RL Identity compromised ***LINK***
« on: September 17, 2013, 12:19 am »
Here we go with silk roads resident sicko again. There is a million page thread about this garbage already....

I second that shit man! Who the fuck wants to even hear this shit? There's no justifying that sort of sick shit and you would think by now that he would have gotten the fact we don't care for hearing anything on the issue and there's nothing he can possibly say to justify the production of CP.

Fuck you Kenny Powders! You've opened the floodgates for yet another lop-sided rant about why the age of consent should be lowered and all that other sick fucking shit. You're a funny ma'fucka but please dude, spare us the pages and pages of useless rebuttle from this guy.

*Braces himself for the next wave of this guy's bullshit*

I never said CP production should be legal. Also, apparently a lot of people want to hear this shit, because people keep making threads about it.

Pages: 1 ... 3 4 [5] 6 7 ... 249