LibreCryptography
119 subscribers
24 photos
5 files
173 links
Aggregating and Organizing Some Crypto-Related Resources | Under the #librehash brand
Download Telegram
Testing 'webhook' briefly (disregard this message)
Forwarded from Librehash Research
image_2021-08-23_03-58-17.png
74.5 KB
Was looking for something else related to Ethereum, but saw this Reddit comment & felt compelled to respond.

1. Ethereum's version of keccak is different than the SHA3 standard because they decided to move ahead before the authors of the algorithm sent in their final submissions (to the NIST competition; 'Blake' was another finalist here).

2. The "NSA" did not force the authors to tweak their algorithm. The U.S. agency responsible for holding the competition, liaising w teams, publishing information & ultimately adjudicating the competition was the NIST.
Forwarded from Librehash Research
Apologies, I stated above that the NSA did not 'force' the researchers to make changes but looking closer here it appears the user actually stated that, "NSA modified some parts from Keccak256 and released it as the current SHA-3 after ethereum release, that's the reason ethereum uses keccak256 and not sha-3."

This is unequivocally false. And we know that its false because there were no changes made to the actual cryptographic algorithm.

Here's an excerpt from Wikipedia that explains this well (Wikipedia does an excellent job of breaking down tech & math-related concepts; just don't consult that site for anything that falls outside of that topic).
Forwarded from Librehash Research
"The hash function competition called for hash functions at least as secure as the SHA-2 instances. It means that a d-bit output should have d/2-bit resistance to collision attacks and d-bit resistance to preimage attacks, the maximum achievable for d bits of output. Keccak's security proof allows an adjustable level of security based on a "capacity" c, providing c/2-bit resistance to both collision and preimage attacks. To meet the original competition rules, Keccak's authors proposed c=2d. The announced change was to accept the same d/2-bit security for all forms of attack and standardize c=d. This would have sped up Keccak by allowing an additional d bits of input to be hashed each iteration. However, the hash functions would not have been drop-in replacements with the same preimage resistance as SHA-2 anymore; it would have been cut in half, making it vulnerable to advances in quantum computing, which effectively would cut it in half once more."
Forwarded from Librehash Research
Article mentions that Schneier went out on a limb here to say that the NSA had forced the authors to make change to the algorithm but this is simply not true...and he walked that statement back in an apology (source: *https://www.schneier.com/blog/archives/2013/10/will_keccak_sha-3.html*) <— note that Schneier had a competitor in this competition (Skein; this is a very cool hash algo).
Forwarded from Librehash Research
image_2021-08-23_04-10-20.png
136.9 KB
Last two sentences up here are worth reading (remember this whole thing happened post-Snowden [as in Snowden just happened only slightly prior], so there was a lot of scrutiny on them as well as the selected winners).

End Result

"In response to the controversy, in November 2013 John Kelsey of NIST proposed to go back to the original c = 2d proposal for all SHA-2 drop-in replacement isntances. The reversion was confirmed [in] subsequent drafts and the final release."
Zax

This is a pretty cool project. Apparently, they're an "NaCL-based Cryptographic Relay"

Here's their GitHub - https://github.com/vault12/zax

On their GH they state, "Zax is a NaCL-based Cryptographic Relay, easily accessed via the Glow library ('glow' is a repo under 'vault12' on GH). Zax relay nodes are asynchronous 'dead drops' for mobile communications. Relays are intended to be multiplied for reliability and form a distributed network. Individual devices send messages to a mutually deterministic subset of relays and check the same for response traffic."
1. Guideline That Outlines How to Create GPG Keys With an Advanced Algorithm = https://www.gniibe.org/memo/software/gpg/keygen-25519.html

2. Covering the Types of Encryption Covered by Bitcoin = https://wiki.gnupg.org/ECC

3. Another Great Resource on Elliptic Curve Cryptography = https://arstechnica.com/security/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/

4. OpenSSL Cheat Sheet (meh, could be useful) = https://www.thesslstore.com/blog/openssl-commands-cheat-sheet/

5. Agent Configuration (for GPG) = https://www.gnupg.org/documentation/manuals/gnupg/Agent-Configuration.html

6. GNU Privacy Guard (operational GPG Commands) = https://www.gnupg.org/documentation/manuals/gnupg-devel/Operational-GPG-Commands.html

7. A Ton of Useful Information RE: Using GPG Keys For Virtually All Purposes = https://wiki.archlinux.org/index.php/GnuPG#Encrypt_a_password

8. Code Signing & Verification With OpenSSL = https://eclipsesource.com/blogs/2016/09/07/tutorial-code-signing-and-verification-with-openssl/

9. Breaking Down KeyFiles on Veracrypt = https://www.veracrypt.fr/en/Keyfiles.html

10. Sign and Verify Public Keys Via the OpenSSL Command Line = https://raymii.org/s/tutorials/Sign_and_verify_text_files_to_public_keys_via_the_OpenSSL_Command_Line.html

11. Breaking Down OpenSSL Encryption Techniques = https://gist.github.com/dreikanter/c7e85598664901afae03fedff308736b

12. More Useful Information Regarding OpenSSL (specifically encryption & decryption with IV + AES) = https://security.stackexchange.com/questions/188457/how-can-i-use-openssl-to-decrypt-aes-encrypted-data-using-the-key-and-initializa

13. Veracrypt (explaining how key files are leveraged on the protocol) = https://www.veracrypt.fr/en/Keyfiles.html
Great link on Hardening One's GPG Configuration

https://www.designed-cybersecurity.com/tutorials/harden-gnupg-config/ (check that out here) ; maybe this gets crossposted into libresec / who knows!
MPFR: For precise arithmetic in the calculation of values (this is especially important when it comes to cryptographic computations; this is done at the sake of some speed, but when a precise value must be calculated, this is the library that is generally used [perhaps on a remote server first to ensure that any compromises on the host do not impact the results that are gleaned back from it]) = https://gforge.inria.fr/frs/?group_id=136&view=shownotes&release_id=10837
Adiantum: Wide-block mode. This is not a primitive but rather a scheme of some sort (utilizes a combination of XChaCha20 + AES) <—- but where's the AEAD part that you get with the poly1305??

Ah, its in there per an explanation of the specifications.

States, "It works by first hashing almost the entire plaintext using a keyed hash based on Poly1305 and another very fast keyed hash function called NH"

NH? Never heard of that (hashed key function).

Feistel Network: Allows you to decrypt ciphertext that has been hashed right? Not sure need to check in on that

All information gleaned from above coming from Google = https://security.googleblog.com/2019/02/introducing-adiantum-encryption-for.html
HCTR: A Variable-Input Length Enciphering Mode (this sounds extremely fucking interesting)

I wonder if there's any way that the hash of a cipher text can be taken since hashes are not invertible (but encryption is).

Feels like it would be a really good idea to encrypt a hashed output (specifically ; not signatures though).

I only say what I said above because if the hash is being used to obfuscate / hide something, then the encryption will ensure that in the worst case scenario, someone will only find a hashed out / mixed version of what they're to decipher (and there's a considerable burden to be able to get to that point).

Need to Definitely Test for the AEAD Quality of This (perhaps if the hash was encrypted with XChacha20 - poly1305?)

Thinking that there's some version of this idea that ties into what I was thinking as it pertains to hash chains.
Hash Chains

I
was wrong about my initial impression but also possibly on to something as it pertains to the hash tree that could be created with Blake.

Hash / Merkle Tree Concept

Rather than just creating an appended list (sort of like blockchain) and then adding an additional operation that merely hashes the last input, it feels like it would be prudent to have all of the values hashed together in some capacity.

So that means:

1) H = x

2) H(x)

3) H(H(X))

4) H(H(H(X)))

There's something that's missing in this construction.

Only way that this could work is if the generator of the hash chain kept at least a few values secret.

But it is impossible for this to be done in a way where all of those values are kept secret and this be seen as externally valid.

The only other way is to ensure that all of the values are public. But if you must do that then you need to devise another method that will require people to remain honest bc you've trapped off their avenues for "cheating".

This is why the write-up on the way that time is calculated on the blockchain is extremely fucking important - it is an objective source of randomness that keeps everyone honest if it can be adhered to.

The idea that I had about the UNIX time tracking was interesting, but ultimately one critical underpinning here (hmm...)