GithubHelp home page GithubHelp logo

crypto101 / book Goto Github PK

View Code? Open in Web Editor NEW
3.0K 3.0K 189.0 19.68 MB

Crypto 101, the introductory book on cryptography.

Home Page: https://www.crypto101.io/

License: Other

TeX 40.19% Python 52.66% Makefile 2.25% Shell 2.61% CSS 2.30%

book's People

Contributors

ankushgarg1998 avatar bwagner5 avatar coh2 avatar darkryder avatar dependabot[bot] avatar dfc avatar dg-latacora avatar edoverflow avatar gliptak avatar hmmueller avatar joepie91 avatar jsachs avatar jvasile avatar louiswolfers avatar lvh avatar mandragorian avatar miham avatar mrkline avatar multun avatar nktrejo2020 avatar onprem avatar ousia avatar rofrol avatar solidgoldbomb avatar stepnem avatar tasn avatar trackpick avatar treycucco avatar trivedi avatar zero-1729 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

book's Issues

5.2, 2nd/3rd paragraph

Perhaps move/edit "There is an obvious flaw with it" to the end of the paragraph: "But this scheme actually presents a huge security flaw."

It didn't appear to be an obvious flaw until after I read the Visual Inspection section and saw the image examples.

Tahoe-LAFS

We should explain Tahoe-LAFS as a complete cryptosystem. It has lots of cool tidbits including being distributed and being an object-capability system; as a consequence, it puts it to people that key pairs can be a lot more than a (human or human-constructed) identity.

Add K2KDFs (so, KDFs for when input already has high entropy)

Right now, we assume key derivation just means "the thing you use when someone gives you a password and you want to store it securely". It can also mean "that thing you use when you want to turn a DH secret into an encryption + MAC key", or "that thing you use to do key cycling but you don't have any new secret bits".

Ring signatures

These should probably go in the signatures section, near the end.

Finish GCM mode section

The GCM mode thing appears to end in a stub:

*** <<<GCM mode>>>

GCM mode is an \gls{AEAD mode} with an unfortunate case of RAS
syndrome (redundant acronym syndrome): GCM itself stands for "Galois
Counter Mode". It is formalized in a NIST Special
Publication\cite{gcm} and roughly boils down to a combination of
classical CTR mode with a \gls{Carter-Wegman MAC}. That MAC can be
used by itself as well, which is called \gls{GMAC}.

**** Authentication

GCM mode (and by extension GMAC)

(EC)?DH security level as function of key size

The current version of the book cites RSA Labs which talks about relative required key sizes for the RSA problem (solved with GNFS) versus an elliptic curve variant (solved using some unnamed sqrt(n) algorithm). We're using this for DH, even though it's obviously not about DH. There's a footnote clarifying that EC vs classic DH has a similar work factor, but it'd be cool if we had a real citation for this instead of just a handwave.

4.3, last paragraph

Replace "ofr" with "for":

"it will probably continue to be used ofr many years to come"

"it will probably continue to be used for many years to come"

5.4, 3rd paragraph (minor edit)

Instead of: "Decryption, is, obviously, the inverse construction."

Consider: "Decryption is the inverse of construction."

Explain why 2DES would be a bad idea

Basically, illustrate the obvious meet-in-the-middle attack on 2DES. Right now we just pretend that it's because 3DES gives an obvious way to have the same hardware be compatible with old single DES (k1=k2=k3), but that's not really the main reason.

5.2, Paragraph before conclusion

For slight increase in readability / flow:

Instead of:
"That's a huge number, consisting of 39 digits, a number large enough that trying all combinations is considered impossible. This attack allows them to do it in at most"

Consider:
"That's a huge number—consisting of 39 digits. It's so large that trying all combinations is considered impossible. This attack, however, allows them to do it in at most"

5.2, Conclusion

I'm not sure I understood what was being communicated through the conclusion...

Maybe the items listed below can be clarified?
"none of these issues apply"--what issues was this referring to?
"We can discover many things about the data"--wasn't sure if this was a good or bad thing.
"Real world block ciphers obviously have many more limitations."--compared to which other limitations?

HMAC

We should explain HMAC.

Figure 5.1

Consider moving (b) to the end of the image series. Does it make more sense to progress from non idealized to idealized?

Clarify CBC IV properties

In the part about BEAST it suggests that IVs should be truly random. That's not true. They have to be unpredictable. The fact that IVs should be unpredictable should be in the paragraph where we first introduce IVs, as well.

5.2, 6th paragraph, #2

"but the fundamental problem still remains"

Can you reiterate the fundamental problem? At this point in the reading, I'm unclear as to what it is...

5.2, 6th paragraph

Instead of: "As you can see, the situation gets slightly "better" with"

Consider:
"As you can see, the original plaintext image is slightly better encrypted with"

5.4, 2nd paragraph (minor edit)

Instead of: "Initialization vectors come back in many other algorithms."

Did you mean: "Initialization vectors appear in many other algorithms."

Explain PRF, PRP

They are in the acronym list, and the HMAC section expects you to know what those words mean in order to understand the security proof.

5.2, 3rd Paragraph

Consider:
"If the properties of the block cipher hold, then solely within this stream, an attacker still wouldn't be able..."

Improve the ECB encryption oracle section

5.2, 8th paragraph: "Using ECB mode with a plaintext consisting of an attacker-controlled part followed by some secret data, allows the attacker to decrypt a block's worth of that secret data"

I found myself having a bit of trouble comprehending the above paragraph.

Would it thus be helpful to remove this paragraph and instead place tail end of it after the formula?
i.e.
"C=ECB(Ek, A || S)
This allows the attacker to decrypt a block's worth of secret data"

Prefix-MAC

We should explain why e.g. SHA2(prefix + something) isn't a secure MAC.

We could also add that it can be a secure MAC under most SHA3-era hashes, but I feel bad suggesting it over HMAC.

Figure 5.1 annotation

"Only the first block size is realistic"

Perhaps consider calling out the first block size, i.e. "Only the first block size (c)" is realistic."

I was unsure of which image the 'first block size' referred to.

5.2, 4th paragraph, last sentence

Instead of: "We then visually inspect"

Consider: "We'll then visually inspect..."

It seems to conform with the style used in the prior sentence.

5.2, 5th paragraph

Would it be helpful if this paragraph were removed? Wasn't sure what it added to the conceptual understanding that wasn't already stated or that couldn't be quickly grokked by the image example.

If not, consider:

Instead of: "Because identical blocks of pixels in the input map to"

Perhaps consider: ""Because identical blocks of pixels in the input will map to"

I got confused thinking this was one concept--an "input map".

5.2, 6th paragraph, #3

"But AES is the workhorse of modern block ciphers:"

Consider replacing ":" with "—"

"But AES is the workhorse of modern block ciphers—it can't be at fault, certainly not because"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.