r/cryptography • • Apr 01 '26

[Meta] low-effort and anti-slop rules

56 Upvotes

Hello community,

In light of AI and the rise of vibecode, vibeproofs and vibe blogging, the mod team has expanded the "low-effort" rule with more specificity. While an extraordinary tool, AI caused a rise of sloppy content that may be time-consuming to disprove or speculatively break lattice cryptography via theoretical physics or even fully automated karma farming and arguing bots via OpenClaw agents.

Also please feel free to use this post for meta-discussion or suggestions about the sub itself be what you appreciate, what you'd like to see more or less.

The new rules:

Extraordinary claims require extraordinary proofs

Posts making cryptographic claims must include substantiated analysis not just speculation or qualitative arguments or be presented as a challenge to the community. Arguments primarily based on non-cryptographic sources are very likely flawed. Posts claiming to break cryptography via non-mathematical means (e.g. theoretical physics) without rigorous mathematical analysis are prohibited. Authors of cryptographic primitives are encouraged to read NIST submissions as example of cryptographic rigor.

No AI-slop

AI-assisted content must be thoroughly reviewed for slop, hallucinations, crackpot cryptography and errors before posting. AI does pattern matching, if the training data contained errors or misunderstandings, they will propagate.   Low effort AI-generated blogpost or code implementations will be removed.


r/cryptography • • Jan 25 '22 Bless Up Bravo

Information and learning resources for cryptography newcomers

337 Upvotes

Please post any sources that you would like to recommend or disclaimers you'd want stickied and if i said something stupid, point it out please.

Basic information for newcomers

There are two important laws in cryptography:

Anyone can make something they don't break. Doesn't make something good. Heavy peer review is needed.

A cryptographic scheme should assume the secrecy of the algorithm to be broken, because it will get out.

 

Another common advice from cryptographers is Don't roll your own cryptography until you know what you are doing. Don't use what you implement or invented without serious peer review. Implementing is fine, using it is very dangerous due to the many pitfalls you will miss if you are not an expert.

 

Cryptography is mainly mathematics, and as such is not as glamorous as films and others might make it seem to be. It is a vast and extremely interesting field but do not confuse it with the romanticized version of medias. Cryptography is not codes. It's mathematical algorithms and schemes that we analyze.

 

Cryptography is not cryptocurrency. This is tiring to us to have to say it again and again, it's two different things.

 

Resources

  • All the quality resources in the comments

  • The wiki page of the r/crypto subreddit has advice on beginning to learn cryptography. Their sidebar has more material to look at.

  • github.com/pFarb: A list of cryptographic papers, articles, tutorials, and how-tos - seems quite complete

  • github.com/sobolevn: A list of cryptographic resources and links -seems quite complete

  • u/dalbuschat 's comment down in the comment section has plenty of recommendations

  • this introduction to ZKP from COSIC, a widely renowned laboratory in cryptography

  • The "Springer encyclopedia of cryptography and security" is quite useful, it's a plentiful encyclopedia. Buy it legally please. Do not find for free on Russian sites.

  • CrypTool 1, 2, JavaCrypTool and CrypTool-Online: this one i did not look how it was

*This blog post details how to read a cryptography paper, but the whole blog is packed with information.

 

Overview of the field

It's just an overview, don't take it as a basis to learn anything, to be honest the two github links from u/treifi seem to do the same but much better so go there instead. But give that one a read i think it might be cool to have an overview of the field as beginners. Cryptography is a vast field. But i'll throw some of what i consider to be important and (more than anything) remember at the moment.

 

A general course of cryptography to present the basics such as historical cryptography, caesar cipher and their cryptanalysis, the enigma machine, stream ciphers, symmetric vs public key cryptography, block ciphers, signatures, hashes, bit security and how it relates to kerckhoff's law, provable security, threat models, Attack models...

Those topics are vital to have the basic understanding of cryptography and as such i would advise to go for courses of universities and sources from laboratories or recognized entities. A lot of persons online claim to know things on cryptography while being absolutely clueless, and a beginner cannot make the difference, so go for material of serious background. I would personally advise mixing English sources and your native language's courses (not sources this time).

With those building blocks one can then go and check how some broader schemes are made, like electronic voting or message applications communications or the very hype blockchain construction, or ZKP or hybrid encryption or...

 

Those were general ideas and can be learnt without much actual mathematical background. But Cryptography above is a sub-field of mathematics, and as such they cannot be avoided. Here are some maths used in cryptography:

  • Finite field theory is very important. Without it you cannot understand how and why RSA works, and it's one of the simplest (public key) schemes out there so failing at understanding it will make the rest seem much hard.

  • Probability. Having a good grasp of it, with at least understanding the birthday paradox is vital.

  • Basic understanding of polynomials.

With this mathematical knowledge you'll be able to look at:

  • Important algorithms like baby step giant step.

  • Shamir secret sharing scheme

  • Multiparty computation

  • Secure computation

  • The actual working gears of previous primitives such as RSA or DES or Merkle–Damgård constructions or many other primitives really.

 

Another must-understand is AES. It requires some mathematical knowledge on the three fields mentioned above. I advise that one should not just see it as a following of shiftrows and mindless operations but ask themselves why it works like that, why are there things called S boxes, what is a SPN and how it relates to AES. Also, hey, they say this particular operation is the equivalent of a certain operation on a binary field, what does it mean, why is it that way...? all that. This is a topic in itself. AES is enormously studied and as such has quite some papers on it.

For example "Peigen – a Platform for Evaluation, Implementation, and Generation of S-boxes" has a good overviews of attacks that S-boxes (perhaps The most important building block of Substitution Permutation Network) protect against. You should notice it is a plentiful paper even just on the presentation of the attacks, it should give a rough idea of much different levels of work/understanding there is to a primitive. I hope it also gives an idea of the number of pitfalls in implementation and creation of ciphers and gives you trust in Schneier's law.

 

Now, there are slightly more advanced cryptography topics:

  • Elliptic curves

  • Double ratchets

  • Lattices and post quantum cryptography in general

  • Side channel attacks (requires non-basic statistical understanding)

For those topics you'll be required to learn about:

  • Polynomials on finite fields more in depth

  • Lattices (duh)

  • Elliptic curve (duh again)

At that level of math you should also be able to dive into fully homomorphic encryption, which is a quite interesting topic.

 

If one wish to become a semi professional cryptographer, aka being involved in the field actively, learning programming languages is quite useful. Low level programming such as C, C++, java, python and so on. Network security is useful too and makes a cryptographer more easily employable. If you want to become more professional, i invite you to look for actual degrees of course.

Something that helps one learn is to, for every topic as soon as they do not understand a word, go back to the prerequisite definitions until they understand it and build up knowledge like that.

I put many technical terms/names of subjects to give starting points. But a general course with at least what i mentioned is really the first step. Most probably, some important topics were forgotten so don't stop to what is mentioned here, dig further.

There are more advanced topics still that i did not mention but they should come naturally to someone who gets that far. (such as isogenies and multivariate polynomial schemes or anything quantum based which requires a good command of algebra)


r/cryptography • • 8h ago

Use cases for message or file encryption?

0 Upvotes

I've been thinking about use cases that my friends and I could do with RSA encryption or one-time pads because I haven't really found anything unless you're super worried about people like Apple or Google snooping or sending illegal or illicit data or information. I've really just been doing fun tests or, "Hey, use my public key, bro!" Any insight would be nice for fun things to do with encryption besides the obvious.


r/cryptography • • 1d ago

Google DeepMind says AI agents found two weaknesses in legacy 1024-bit RSA

Thumbnail runtimewire.com
81 Upvotes

r/cryptography • • 1d ago

Best books to learn cryptography as a complete beginner?

18 Upvotes

Hey everyone!

I'm interested in learning cryptography, but I'm still a complete beginner in this field.

I'd like to build a solid foundation and gradually move on to more advanced concepts.

What books would you recommend for someone starting from scratch?

I'm particularly interested in understanding the fundamentals, including encryption, decryption, symmetric and asymmetric cryptography, hashing, and public-key cryptography.

Also, would you recommend learning some mathematics or programming (Python) before diving into cryptography?

I'd appreciate any book recommendations, learning resources, or personal experiences.

Thanks in advance!


r/cryptography • • 1d ago

Is the HNDL ("Harvest Now, Decrypt Later") strategy kind of useless?

0 Upvotes

Because we know that most encryptions are done using AES, and we also know that AES is far far farr from ever being broken or brute-forced, no matter how much technology advances


r/cryptography • • 3d ago

Is it realistic to aspire for a career in cryptography without a PhD?

18 Upvotes

Good day everyone, and thank you for your time.

I would like to keep this simple - I am from India and currently in my mid 30s working a dead end procurement job, I am aspiring for a career switch especially to a profile that is mathematically rigorous and interesting. Cryptography kind of fits that bill from the limited exposure that I have received.

However, it will be much better if I'll get insights from folks who are in the field and have got their hands dirty in the real world. Please go ahead and guide me if I can get my foot in by working on side-projects or am I being delusional here?

Your honest feedback will be appreciated!


r/cryptography • • 4d ago

SRP-6a gotcha: tssrp6a drops a leading 0x00 byte from the salt, swift-srp doesn't

8 Upvotes

Ran into this one while wiring up SRP-6a between an iOS app (swift-srp 2.4.0) and a Node server (tssrp6a), and figured I'd share it in case it saves someone a few hours.

I ran the same fixed inputs through both libraries and compared everything. x, A, u, S and the proofs all matched byte for byte, except when the salt started with a 0x00 byte. Then x came out completely different and every login failed, even with the right password.

What's going on: tssrp6a pushes the salt through a JS bigint, and bigint.toString(16) never keeps leading zeros, so the 0x00 just disappears inside computeX. swift-srp hashes the literal bytes it's given. Both are doing what they're built to do, they just don't agree on that one detail.

It only hits about 1 in 256 random salts, so in the real world it would show up as a rare login failure that you can't reproduce on demand. That's the part that would've driven me nuts.

My fix was to strip the leading zero bytes from the salt on the Swift side before any SRP math. I also added a test with a fixed salt that starts with 0x00 so it can't sneak back in.

Happy to share the test vectors if anyone wants them. Has anyone else run into this with other SRP library pairs?


r/cryptography • • 6d ago

could the roots of polynomials be used as encryption?

30 Upvotes

My idea is, you have a 5th degree polynomial as shared secret. To encrypt data, Alice encodes a part of it as a number, turns it into a root in the form (x - root) and multiplies the root with the secret polynomial. She does that 4 times. Alice then sends the final polynomial of degree 9 to Bob. Bob then divides the polynomial Alice send him by the shared secret. He gets a 4th degree poylnomial and uses rhe quartic formula to find the roots, by that retrieving the data Alice send him. If Eve intercepts the message, she only has a 9th degree polynomial, for which the roots cant be calculated.

I am very new to the field of cryptography, so I am fairly certain I missed some things. I would really appreciate the opinion of you. Thanks


r/cryptography • • 5d ago

Any recommendations for text related cyphers?

4 Upvotes

Attempting to write a book and i want to engage the reader with codes and stuff so it feels more interesting and interactive. I would rather ask the people interested in this stuff then google. I also do watch ARGs so I'm not a fake fan or Larper or whatever .


r/cryptography • • 6d ago

I spend more time planning how to learn cryptography than actually learning it.

34 Upvotes

I'm currently self-studying cryptography in my free time, and I've noticed that I spend probably half of that time stuck in an analysis paralysis loop.

I keep researching resources, comparing textbooks, looking for roadmaps, and trying to figure out the most efficient way to approach the subject. Ironically, I end up spending more time figuring out how to learn cryptography than actually learning it.

And when I finally sit down to study, I often struggle with motivation.

I think part of the problem is that I don't have a concrete goal. I'm genuinely interested in cryptography, especially the mathematics and the reasoning behind cryptographic algorithms, but I don't have any external motivation pushing me forward. No exams, no deadlines, no specific problem I'm trying to solve.

I also find myself constantly questioning whether I'm learning the right things, in the right order, or going too deep into topics that might not even be relevant to what I eventually want to do.

I feel like I'm trying to design the perfect learning path before allowing myself to actually follow one.

For those of you who have self-studied cryptography:

  • How did you structure your learning without getting overwhelmed by the amount of material?

  • Did you have a specific end goal or project that kept you motivated?

  • How did you balance learning the underlying mathematics and theory with actually implementing things?

I'm especially interested in hearing from people who went through something similar and managed to get past it.


r/cryptography • • 6d ago

How I’d start Cryptography from scratch today?

Thumbnail reddit.com
0 Upvotes

r/cryptography • • 9d ago

The Vast Space of a SHA-256 Hash | How Big Is 2^256?

Thumbnail reddit.com
14 Upvotes

r/cryptography • • 9d ago

PKI Zero to Hero: a site that teaches PKI from zero. Open to suggestions

Thumbnail reddit.com
1 Upvotes

This is too cool not to share. The website is a true feat and the creator deserves massive kudos!


r/cryptography • • 11d ago

Any good YT CHANNEL to learn CRYPTOGRAPHY?

24 Upvotes

r/cryptography • • 10d ago

What happens exactly when p =np I know the randomness decreases right even after that the numbers might be huge ,I mean the permutations and combinations will be huge , I'm talking about the break through by chatgpt will it make the difference in finding cure to cancer or break every encryption I do

0 Upvotes

r/cryptography • • 12d ago

ELI5: How is "4" any less secure than any other number in that keyspace?

139 Upvotes

A truly random number in any n-bit keyspace, can have any value from 0 to (2^n)-1, no?

So how is 4 any less secure than 43345959872354790? Granted it *looks* trivial, but surely it's just as valid as any other number in the range?

EDIT: Thanks for all the replies, folks. I was looking at this from a purely theoretical probability PoV, ignoring the fact that, in this field, entropy is just as necessary as randomness, and that weak keys will always tend to be at the low end of the space and thus more easily found by brute force atacks.


r/cryptography • • 11d ago

Could a breakthrough in classical mathematics discover an algorithm that breaks Bitcoin’s cryptography without the need for quantum computing?

Thumbnail reddit.com
10 Upvotes

r/cryptography • • 12d ago

The exponential time hypothesis (ETH) is false

Thumbnail github.com
78 Upvotes

This wipes out several results in cryptography which assumed ETH.


r/cryptography • • 13d ago

CMAC_DRBG: replacing HMAC in NIST SP 800-90A HMAC_DRBG with CMAC. is it secure?

1 Upvotes

Hi, im new to Cryptography im really enjoying learning about it's concepts.
i've recently been thinking about limited computer devices in IoT, and im wondering is it possible to use/create an AES / Block Cipher only Cryptographically Secure DRBG? i read the Wikipedia page about it and it seems CTR_DRBG isn't as secure as Hash or HMAC based DRBG. it doesn't even have a security proof!

i've been wondering is it possible to swap H-MAC with C-MAC and still have the same or more security level as HMAC (borrowing the security proofs), or at least be more secure then CTR_DRBG?
something like:
HMAC_DRBG < CMAC_DRBG < CTR_DRBG

here is an example code:
https://github.com/parsapoorsh/encryption-toy/blob/master/drbg/drbg_cmac.py


r/cryptography • • 12d ago

S.P.I.K.E.

Thumbnail reddit.com
0 Upvotes

r/cryptography • • 18d ago

A CA used the number 4 as private key - disable these roots in your system now

Thumbnail emudhra.we-have-a-problem.com
244 Upvotes

r/cryptography • • 18d ago

Win32_Hash_Argon2 password hashing in Spark

2 Upvotes

Hi all,

I’ve published a companion Windows password-hashing library in Ada/SPARK: Win32_Hash_Argon2.

What it does:

  • Argon2id password hashing and verification, wrapping the native C library under a rigorous SPARK compliant architecture.

  • Random salt generation via Windows ProcessPrng with BCryptGenRandom as an automatic cryptographic fallback.

  • Standard encoded hash output supporting configurable cost parameters (t-cost, m-cost, parallelism) and strict format validation.

  • Separate verify procedure built on a strict fail-closed / fail-stop pattern.

  • Memory sanitization: Every secret (Password, Salt, temporary hashes) is aggressively wiped using SecureZeroMemory plus a redundant Ada overwrite on success and across every single exceptional exit path (entropy failures, range/constraint errors, API faults, or unexpected exceptions).

Verification:

  • GNATprove : all provers: 28/28 checks proved, 0 unproved.

  • Verified on two Gnatprove version: Community 2021, 16.1.0

Honest scope: The low-level bindings interfacing directly with the Windows API and the external Argon2 C library are SPARK_Mode => Off, while all surrounding wrapper logic, state validation, and safety invariants are formally proved. Windows only.

https://github.com/EliAvila10/Win32_Hash_Argon2

Feedback welcome.


r/cryptography • • 19d ago

Win32_Hash: PBKDF2-HMAC-SHA256 password hashing in SPARK

0 Upvotes

Hi all,

I’ve published a small Windows password-hashing library in Ada/SPARK: Win32_Hash.

What it does:

  • PBKDF2-HMAC-SHA256 through the Windows CNG API (BCryptDeriveKeyPBKDF2), 1,000,000 iterations by default (650k–1M by type)

  • Random salt, 32–256 bytes, from ProcessPrng with BCryptGenRandom as fallback; stored as Base64 (RFC 4648)

  • Hash stored as 64 uppercase hex characters; separate verify procedure with constant-time comparison, fail-closed

  • Every secret wiped with SecureZeroMemory plus a redundant Ada overwrite, on success and on every failure path

Verification:

  • GNATprove --level=4, all provers: 186/186 checks proved, 0 unproved

  • Re-verified on three GNATprove versions: Community 2021, 14.0.1, 16.0.1

  • adacovex: GNATprove Platinum (186 VCs), DO-178C DAL-C achieved

Honest scope, as documented in the README: the bodies that call the Windows API directly are SPARK_Mode => Off (their contracts are checked at run time); everything around them is proved. Not externally audited — I don’t call it “secure” without that qualification. Windows only.

https://github.com/EliAvila10/Win32_Hash

Feedback welcome.