r/cryptography

What exactly is in cryptography?

Hey so I wanted to learn cryptography as I am into crypto and wanted to make some advance projects and as crypto runs on cryptography so I thought to learn it, but when I saw some resources all they did was telling what these terms do (like XOR, caeser) so I am confused as how will we be able to make projects , ps I can't learn somany things...

reddit.com

How do we define XOR mask for multi-lane bitwise AEGIS AEAD?

I've been inspecting bitwise AEAD implementation and initialization function of the x2-lane variant using XORing by some constant_ctx_mask before every single round. According to the docs on AEGIS, the mask is used to prevent data association from parallelism, but I don't understand why the mask is the way it is.

Let's consider 2 examples:

> Bitwise AEGIS256x2 barrel-shift-32-bit: the mask contains 64 32-bit words set to zero except for positions 30, 61 and 62 with values 0x1F (indexes 29, 60 and 61 correspondingly)

> Bitwise AEGIS256x2 barrel-shift-64-bit: the mask contains 32 64-bit words set to zero except for word 29 set to 0x1F and word 30 set to 0x1F_00_00_00_1F (byte separation by underscores for readability, indexes 28 and 29 respectively).

My questions are:

  1. What's the logic behind building such a mask and reasoning behind such particular values and positions?

  2. How do we extend ithe mask for massive parallelism on e.g. 4-way, 8-way, etc.?

reddit.com
u/Salat_Leaf — 2 days ago
▲ 15 r/cryptography+2 crossposts

What careers involve a high level of combinatorics and problem-solving?

What industry roles involve substantial use of combinatorics, discrete mathematics, graph theory and advanced problem-solving?

For those working in such roles:

What are the relevant job titles?

What types of problems do you typically work on?

How much mathematics is involved in your day-to-day work?

How much of the role consists of programming or software engineering?

What skills and educational background are typically required?

What is the day-to-day work experience like?

Which industries or companies tend to have these types of roles?

I'd particularly appreciate responses from people with direct industry experience.

reddit.com
u/Appie-Fixo-8010 — 3 days ago

Interesting crypto address or 'hash' conjecture: "True burn address"

To preface, I don't have a cryptographic background. But I had an interesting thought:

People sometimes send Bitcoin to mistyped addresses, which no one ever has had the private key for. Or let's say I manually type a random address without using a private key, like a random jumble of characters that fits the length and format. But in theory, if by luck you got the private key by random typing, you have control of the address.

My conjecture is: does there exist a possible address where no possible private key exists?

If it exists, it is a true burn address and nothing can be returned from it, even by quantum computers or luck.

Forgive me if this has already been talked about or I am missing something.

reddit.com
u/memestarbotcom — 6 days ago
▲ 5 r/cryptography+1 crossposts

Is the master secret for SLIP39 (Shamir Backup) generated the same way as Entropy is for BIP39?

When playing around with these tools (Which I know you should not use for your phrase to store funds), it seems to me the entropy field which can be made visible by checking off the "Show entropy details" box in the BIP39 tool and the master secret field in the SLIP39 tool are the same. They are both hexadecimal values and can be 128 or 256 bits.

Is the SLIP39 master secret also generated by entropy when generating a SLIP 39 Shamir Backup? How is the master secret generated?

I found this article explaining step by step how a BIP39 phrase is generated and it starts with entropy, wouldn't SLIP39 be the same by starting with entropy?

https://medium.com/coinmonks/mnemonic-generation-bip39-simply-explained-e9ac18db9477

https://iancoleman.io/bip39/ https://iancoleman.io/slip39/

u/trymeouteh — 7 days ago
▲ 4 r/cryptography+4 crossposts

I have zero coding experience and vibe coded an app with Fully Homomorphic Encryption (FHE)

So for context, I'm a marketing intern at Niobium Microsystems (this is my own personal project, not a company post) and I have zero background in software or cryptography. I'm a 22 year old econ major. I started learning about FHE for work but figured it was one of those super complex technologies that few people can actually work with.

Anyway, I pointed Claude Code at Niobium's public github tools and ended up building an app called VitalVault. You put in health/lab values, they get encrypted, and it calculates a wellness score and an estimated biological age. The server side only ever sees ciphertext, never your actual numbers or the key.

It took me about 3 days and I got stuck a bunch, which was kinda frustrating given that I didnt have any knowledge to understand what was happening half of the time. I also thought that my 2023 macbook air with 8GB of ram was legitimately going to explode at one point, but finally got it running. Claude wrote basically all the code but I still had to learn enough to figure out when something looked off.

I'd really appreciate some feedback, especially from anyone who knows/understands FHE. Did I make any obvious crypto/security mistakes? (Be brutal, I'd rather know). Also curious what more experienced vibe coders would have done differently. https://github.com/leila-db/vitalvault-demo

u/BestAd5572 — 6 days ago
▲ 10 r/cryptography+1 crossposts

What are the hardest problems in PQC migration after crypto discovery?

Hello,

I'm a student researching PQC migration problems to understand migration workflows. I understand that prominent platforms already handle crypto discovery, CBOM generation, risk assessment, dashboards, and in some cases remediation.

After an organization identifies quantum-vulnerable cryptography, what is the hardest part of migration?

For example, is it typically:

  • Legacy systems and unsupported applications
  • Hybrid deployment and backward compatibility
  • Third-party dependencies or vendor-managed systems
  • Performance, key/signature sizes, or bandwidth impact
  • Testing and verifying that changes do not break applications or integrations
  • Deployment constraints

What approaches are organizations using today to handle these problems?

I'd really appreciate it if you could reference concrete examples, case studies, or references.

Thank you!

reddit.com
u/Just_Blackberry3530 — 9 days ago

Master's thesis idea around encryption key management

Hi
I finished my university some years ago but I need to finally write my master thesis. I need to present idea what should I write about so I need to ask here because I don't have supervisor available now.

Now I have idea to write about: cryptoperiods, key rotations and that a rotated KMS key has an infinite cryptoperiod, while CIS/Prowler/AWS Config all report it as compliant because they only check a boolean flag that key is rotated.
My thesis would build a tool that infers actual cryptoperiods from CloudTrail and S3 Inventory instead of config, flags ciphertext still stranded on retired key versions, and generates a re-encryption plan to close the recipient-usage period.

Does this hold up, or am I missing something obvious? And is it master's thesis level or not? Maybe someone has other idea around this key management and cloud topic.

reddit.com
u/Old-Astronomer3995 — 6 days ago
▲ 9 r/cryptography+2 crossposts

Open-source STARK proving at million-row sub-second scale on a consumer AMD GPU

I built and released an open-source Goldilocks/G64 STARK backend on AMD ROCm/HIP:

https://github.com/uulong950/qingming-stark-g64

The artifact exposes a complete proving boundary:

CLI prover → QSPG64 .qsp proof file → standalone verifier

The prover writes a real .qsp proof file. The standalone verifier reads that file and checks public input binding, statement digest, trace openings, quotient FRI, local AIR checks, and quotient relation checks.

The scale/latency boundary is the main point:

SCALE24: 2^24 rows, ~342 ms, verifier PASS
SCALE26: 2^26 rows, ~1.04 s, verifier PASS
SCALE27: 2^27 rows, ~2.04 s, fast_prelayout_xyz, verifier PASS

So this is not only a primitive benchmark. It is an open-source STARK backend producing standalone-verifiable proof files at million-row, sub-second scale on a consumer AMD GPU.

The build surface is small:

make -C rx7900xtx-24g

I am interested in what this latency/scale boundary makes possible:

local proving
proof-carrying APIs
low-cost prover markets
near-real-time verifiable computation
privacy-preserving business logic
hardware-neutral proving infrastructure

My current framing is:

SCALE24 = practical real-time region
SCALE27 = upper benchmark path

I would appreciate feedback on the artifact boundary and on what kinds of cryptographic systems could use open-source STARK proving at this scale.

u/Common_Sorbet3873 — 8 days ago

Cryptography and the job market

Hello! I sincerely hope I dont break rule 4 with this post. Cryptography is by far the most fascinating thing I have found in life so far, and it feels extremely important. I am still learning how to read and write proofs, and I am still self learning c and lean and mathlib, so I am a total beginner, please excuse my ignorance of obvious things.

I am trying to understand if jobs exist, outside of NIST. I am from an obscure east Euro country and have never met a professional cryptographer, and all mathematicians I know just teach, in highschools. If OpenSSL (and similar libs) exists already, and they already implement aes, rsa, sha or whatever else is needed, would a company even need a cryptography specialist to implement it?

reddit.com
u/Technical-Tiger-3422 — 9 days ago
▲ 9 r/cryptography+1 crossposts

LFSR automatic period verifier in SmokeRand 0.49

LFSR based PRNGs are very widespread and fast, we all known xorshift, xoroshiro, etc. But its period verification usually requires its translation to some mathematical notation, computation of characteristic polynomials etc. So I've made a tool (a new lfsr battery for SmokeRand) that allows to make this work without an explicit usage of all that "clever formula", the detailed description is given here.

https://github.com/alvoskov/SmokeRand/blob/main/docs/lfsr.md

The entire idea is fairly simple:

  • Restore the transition matrix by a direct manipulation of the LFSR state, so C code becomes a mathematical formula itself. So it mustn't contain counters, pointers, file descriptors etc. And only PRNG with state size of 32, 48, 64, 96, 128, 160, 192, 256, 320, 512 or 1024 bits.
  • Verify if the period is maximal using the transition matrix.
  • Restore the charateristic polynomial using Krylov matrix and Gaussian elimination, transform it into a jump polynomial. I've used S.Vigna jump functions to check myself here.

It also can be used for LFSR parameters search, I've used it to obtain two new 16-bit versions of xoroshiro (just for fun). That program also reproduces classic Marsaglia shifts triples for xorshift32/64:

https://github.com/alvoskov/SmokeRand/blob/main/apps/find_xorshift_params.c

u/BudgetEye7539 — 8 days ago

Built a directory site for cryptography researchers in India — CRIYPT (feedback welcome)

Hey all,

A few of us have been building CRIYPT (Cryptography Researchers of India) — a community-driven directory connecting cryptography and security researchers across India and the diaspora, spanning academia and industry.

The site's been live in a basic form for a while, but after some really encouraging feedback and support at TPMPC 2025, we rebuilt it incorporating a lot of that input. It's up now at cryptography-research-india.github.io.

What's on there:

  • A searchable directory of researchers, filterable by institution and topic (MPC, ZK, PQC, etc.)
  • A Labs page grouping researchers by their research group
  • An open positions board for PhD/postdoc/industry roles
  • A collaborations board for finding co-authors or implementation partners
  • A community blog, and a feed of recent papers pulled from IACR ePrint

It's fully open source (repo linked on the site), and content gets added through GitHub issue forms — no account setup needed. If you're a faculty member or industry researcher working in this space and not listed yet, you can add yourself in a couple of minutes. (We don't support listing graduate students individually yet, but there's a collaborations board where students can connect with faculty.)

Would genuinely appreciate feedback — on the site, the idea, anything we're missing. And if you know someone who should be on there, feel free to point them our way.

u/ResearchNomad424 — 9 days ago
▲ 13 r/cryptography+2 crossposts

I built a visual tool to explain entropy and randomness in cryptography

After reading about cases where weak entropy led to unsafe keys and people losing funds (recent bitcoin COLDCARD attack) , I decided to learn more about entropy and how it is generated.

There are different ways to generate entropy, like TRNGs, PRNGs, rolling dice, or flipping coins. But for me, it was hard to make these concepts click and understand how we go from a random source of entropy to something like a private key.

So I made a tool that explains this visually.

Live Demo: https://hashexplained.com/entropy
Source (MIT): https://github.com/bitcoin-dev-project/hashes-visualizer

hashexplained.com
u/jrakibi — 12 days ago

Lattice based cryptography

I want to code a python a function which both creates the public key and the private key for lattice based cryptography.But its been a while since I have studied about it and I cant find the video which made me understand it so can you help me remember it?

Suppose we start with a basis of vectors and those vectors are pretty small for conveniency. Lets say we take [{1,0},{0,1}].The smallest distance vector to point 1,1 lets say is {1,0}+{0,1}.Now we change basis to something much more difficult and we ask the same question find (smallest) coefficients a and b for the new basis such as we point to 1,1.Now all good. The new basis vector is the public key and the 2x2 matrix to give us the basis vectors 1,0 and 0,1 is the private key because with 1,0 and 0,1 we can easily calculate the smallest vector problem. My issue is if we wanted to send a message what exactly will be what we encode okay but is the encoding related to the coefficients in both basises?

reddit.com
u/Routine_Comb_7277 — 9 days ago

Finally close to starting my business!

I'm so happy to post this, it's the first thing I'm doing. But I recently just finished coding a encryption engine for FDE, and I already have the payment processed ready. All I need to do now is pick witch device to start on first.

I'm of course gonna make a version for all operating systems, but I need to make the code but that actually communicates with the OS(operating system), so let me k ow which one I should do first.

I already have a deal with a local mid-scale company for them to test it for free for 3 months and write an honest review for it on their company site, and recommendations to a lot of other businesses/companies.

Before that of course I need about 2 more days to finish the implementation code, setup the app interface, and then I already have a cryptographic analysis that will test my encryption program.

I even got my parents on board with it, sorta, if I can prove people will pay for it, which I'm pricing it at $3/month. So all the publicity will hopefully build the waitlist, and I'm looking for at least 25 people on the list, then it'll take another 2 hours or so to register the business, open a business bank account, and that's it

It should be ready in about 2-3 months! And people said it would take Bout a decade at least. Man, if any WAIT for the analyst to review it.

reddit.com
u/whirls_living_life — 12 days ago
▲ 4 r/cryptography+2 crossposts

If quantum computers can brute-force passwords much faster, wouldn't the verification step still be the bottleneck?

I keep hearing that quantum computers could eventually break passwords or defeat current cryptographic systems. But there's something about this that I don't fully understand.

Let's say an attacker doesn't have access to the password database or the stored password hashes. They only have access to the actual login system, where they can submit a password and the server tells them whether it's correct or not.

A quantum computer might be able to search through a huge number of possible passwords much faster than a classical computer. But wouldn't the attacker still need to have each candidate password verified by the server?

In other words:

Quantum computer: generates/searches possible passwords extremely quickly

Classical server: checks whether each password is correct

Wouldn't the classical server (and things like rate limiting, network latency, account lockouts, etc.) become the actual bottleneck?

Also, I understand that this is different if the attacker has stolen the database and has the password hashes. In that case, they can perform an offline attack and potentially implement the verification function as part of a quantum algorithm, without asking the real server for every guess.

So my question is specifically about the online attack scenario:

If the attacker only has access to a login/verification endpoint, how would a quantum computer actually provide an advantage? Can a quantum algorithm somehow perform the verification without having direct access to the server for every candidate, or would the classical server fundamentally limit the speed of the attack?

I'm trying to understand where my intuition is wrong here.

reddit.com
u/MohsenFatemiii — 12 days ago

I built a hybrid PQC platform and I have no idea what to do with it

I'm a software developer from way before AI, from before this flood of badly made SaaS projects and half-baked platforms. I've been building and refining this for more than a year now.

The platform is the following: login is Web3, wallet-based, with EIP-712 typed signatures, no custody of user keys ever. Payment is crypto, and the payment plus the license record settle in one atomic on-chain transaction. Licenses get dual blockchain anchoring: batches go to a public chain as Merkle roots, so any license can prove inclusion without exposing anyone's data, and the full records are mirrored on a private permissioned ledger for enterprise setups.

Under all of it sits the cryptography: AES-256-GCM envelope per content item, the content key encapsulated with hybrid X25519 + ML-KEM-1024, both shared secrets fed into HKDF-SHA384, Ed25519 platform signatures with kid-based key rotation. Delivery is per-buyer proxy re-encryption: the content key gets re-wrapped for each buyer inside an isolated WASM enclave, the content itself is never re-encrypted. Oh, and all of this happens client-side, the server never touches decrypted data. There was a performance problem with that, which I solved by compiling the SDK from the native Rust crypto (standard RustCrypto crates) to WASM.

In the beginning I was thinking DRM. But during the build I accepted that nothing stops someone from recording or sharing content once it's decrypted on a screen. The analog hole doesn't care about ML-KEM. I realized this could still be something, proof of who licensed what and when instead of "nobody can copy this", but honestly I don't know how to move forward. So I ended up building a web3 marketplace hub on top with the dual anchoring above.

One more thing, and it's the uncomfortable part. The marketplace is built, but I never launched it, and the reason is partly ethical. If you've read this far you probably spotted it already: a marketplace where the operator can never inspect content, and where buyers are pseudonymous wallets, is also a perfect channel for material I want no part of. I don't have a real answer for moderation in a system deliberately designed so nobody can look inside, and I'm not willing to operate one without that answer. So take the marketplace off the table, and what's left in my hands is the cryptographic model and the SDK.

And honestly, after a year on this, I think that's the strongest piece anyway: a drop-in Rust/WASM core that encrypts, delivers and licenses content with hybrid post-quantum crypto, and it works independently of everything else.

Anyway, I'd honestly like your opinion. Should I give up and forget this thing, or is there something here worth pursuing, maybe the SDK and the crypto core on their own? And if you spot mistakes in the composition, say it bluntly, that's why I'm posting.

reddit.com
u/Jazzlike_Wash6755 — 12 days ago

Kerckhoffs's Principle vs. Platform Compression: Does visual disguise matter if a cipher is unbreakable?

I recently went down a rabbit hole looking into open-source projects like the "Infinite-Storage-Glitch," which attempt to use YouTube as unlimited encrypted storage by encoding data directly into video frames.

Watching how these projects evolved raised a cryptography question I've been chewing on:

If the whole encoding method is public knowledge, is it still "hiding" anything? Kerckhoffs's Principle says a cryptosystem should stay secure even when everyone knows exactly how it works, as long as the key stays secret. AES-256 holds up fine to that standard.

But almost none of these YouTube storage projects still disguise data as convincing visual noise. Developers who tried LSB, DCT, and pixel-level steganography found it fell apart the moment YouTube re-encoded the video. The ones that survived had to switch to loud, high-contrast, error-tolerant blocks (basically QR codes). Subtlety loses to compression almost immediately. What's left is just encryption with a video file extension, not real steganography.

The bigger questions:

  1. If a system is mathematically unbreakable without the key, does the visual disguise of steganography matter at all, or is it purely psychological armor that is irrelevant to the math?
  2. As AI anomaly detection gets better at spotting manipulated media, does that shrink the space for steganography to almost nothing, leaving pure cryptography as the only thing that actually holds up in the wild?

Would love to hear thoughts from people working in modern steganography or anomaly detection.

reddit.com
u/non_chalant_32 — 12 days ago