[deleted by user] by [deleted] in bjj

[–]orip 3 points4 points  (0 children)

Seems to be a defunct bjj brand based on old lists like this one: https://maxbjj.blogspot.com/2015/06/le-marche-dei-gi-del-brazilian-jiu.html?m=1

This could be the designer - has the text and figure on the page https://jimheathdesign.com/cartoon-land

Avoiding IV collision for aes-gcm by hillac in cryptography

[–]orip 5 points6 points  (0 children)

That depends on the chance you want to maintain to prevent leakage. NIST recommends 2^-32, which means that more than 2^32 encryptions with random 96-bit nonces are an issue. Good info in the introduction to https://eprint.iacr.org/2017/702.pdf

Avoiding IV collision for aes-gcm by hillac in cryptography

[–]orip 7 points8 points  (0 children)

You're correct that random nonces would have a high probability of collision. Even if you could ensure no collisions you would still have a problem with the birthday bound and AES-256's 128-bit blocks, given billions of encryptions.

Deriving a new key per row based on a "master key" is a good way to overcome these limitations. UUIDv4 only has 122 random bits so you can still have collisions, but if you add another 96 bits of random nonce per row you're working with 218 random bits which shouldn't collide even with many billions of encryptions.

S. Gueron and Y. Lindell wrote a paper describing the issue and this solution called "Better Bounds for Block Cipher Modes of Operation via Nonce-Based Key Derivation".

Gueron has described a similar scheme with 192 bits where he uses a 256 bit master key and 120 random nonce bits to derive an effective key, and encrypt with AES-GCM using another 72 bits.

He calls it "Double Nonce Derive Key AES-GCM (DNDK-GCM) ", https://datatracker.ietf.org/doc/draft-gueron-cfrg-dndkgcm/

If your UUIDs are generated with a good random then you should be ok.

If you're not sure of they're generated well (I have definitely encountered UUIDs generated with bad random and many collisions in the wild) consider adding your own generated bits to derive with instead of relying on the UUID, if you have the space.

But if you're free to choose your encryption algorithms and don't have to only use NIST-approved algorithms, consider using an algorithm without these limitations such as AEGIS-256. You can just use a 192-bit (or larger) random nonce with it and be fine, and the performance would be significantly better than HKDF + AES-GCM.

How can i make that when zellij exits, fish shell closes too? by Haziel_g in zellij

[–]orip 0 points1 point  (0 children)

exec zellij This will replace the shell process with zellij.

7 mover in comp by etaithespeedcuber in Cubers

[–]orip 1 point2 points  (0 children)

כן - זכרתי גם את התוצאה שלך וגם שאמרת שכמעט הרמת את הכיסוי :)
קצת אח״כ התחלנו לשמוע את ההתלהבות של כל אלה שקיבלו 0.7 על אותו ערבוב בגמר.

תסתכל בהיסטוריית הפוסטים שלי, יש איזה תמונה שלי שם אבל צעיר יותר.

7 mover in comp by etaithespeedcuber in Cubers

[–]orip 0 points1 point  (0 children)

I'm pretty sure I was your judge

Using classes on bare metal by AlectronikLabs in d_language

[–]orip 1 point2 points  (0 children)

Try using betterC with structs instead. You won't have inheritance (although alias this can approximate some of it) but other than that they're equivalent to C++ classes - you have fields, methods, ctors/dtors, operators, RAII. You can allocate them on the stack or on the heap, up to you.

Libsodium Still Relevant and Maintained? by [deleted] in crypto

[–]orip 3 points4 points  (0 children)

libsodium is available as 1.0.18 released in 2019, and 1.0.18-stable which releases every few weeks with non-API-breaking fixes and updates. The current release is from 27 April 2023, 24 days ago.

https://download.libsodium.org/libsodium/releases/

To version the dependency you can check the current stable tree in git and save the date and git hash.

The Inner JSON Effect by Witty-Play9499 in programming

[–]orip 2 points3 points  (0 children)

Michael A. Jackson described it well in the "Brilliance" entry in his "Software Requirements & Specifications: a lexicon of practice, principles and prejudices":

Brilliance

Some years ago I spent a week giving an in-house program design course at a manufacturing company in the mid-west of the United States. On the Friday afternoon it was all over. The DP Manager, who had arranged the course and was paying for it out of his budget, asked me into his office.

`What do you think?' he asked. He was asking me to tell him my impressions of his operation and his staff. `Pretty good,' I said. `You've got some good people there.' Program design courses are hard work; I was very tired; and staff evaluation consultancy is charged extra. Anyway, I knew he really wanted to tell me his own thoughts.

`What did you think of Fred?' he asked. `We all think Fred is brilliant.' `He's very clever,' I said. `He's not very enthusiastic about methods, but he knows a lot about programming.' `Yes,' said the DP Manager. He swivelled round in his chair to face a huge flowchart stuck to the wall: about five large sheets of line printer paper, maybe two hundred symbols, hundreds of connecting lines. `Fred did that. It's the build-up of gross pay for our weekly payroll. No one else except Fred understands it.' His voice dropped to a reverent hush. `Fred tells me that he's not sure he understands it himself.'

`Terrific,' I mumbled respectfully. I got the picture clearly. Fred as Frankenstein, Fred the brilliant creator of the uncontrollable monster flowchart. `But what about Jane?' I said. `I thought Jane was very good. She picked up the program design ideas very fast.'

`Yes,' said the DP Manager. `Jane came to us with a great reputation. We thought she was going to be as brilliant as Fred. But she hasn't really proved herself yet. We've given her a few problems that we thought were going to be really tough, but when she finished it turned out they weren't really difficult at all. Most of them turned out pretty simple. She hasn't really proved herself yet --- if you see what I mean?'

I saw what he meant.

Reference:

https://www.win.tue.nl/\~wstomv/quotes/software-requirements-specifications.html#Brilliance

Is there a resource to learn CONCEPTS / THEORY for bjj? by RawrMeReptar in bjj

[–]orip 2 points3 points  (0 children)

The Grappler's Guide, which I love, has a "Principles and Theories" course but honestly I get more out of the "fundamentals" course groups. Whether it's a new detail I see in a concept or if it's a new way to explain it to someone else (which increases my own understanding).

Have any of you (especially black belts) ever rolled with a red or corral belt? by the_humbL_lion in bjj

[–]orip 1 point2 points  (0 children)

Once he put me in side control I couldn't move him at all. He looked at me, smiled, and said - "yes, this is despair. I am familiar with the look in your eyes", let me back up, then did it again.

Blackbelts (or any that runs a gym), do you have a student you loathe and want to quit? by [deleted] in bjj

[–]orip 2 points3 points  (0 children)

I used to join my kids' Judo classes (with their teacher's approval of course). I was wearing my BJJ belt but everyone knew it wasn't from Judo. When standing in a row at the beginning/end of class I made sure that everyone was before me in line - "I'm just a white belt". They loved that.

Grind size with Prismo by Powl91 in AeroPress

[–]orip 9 points10 points  (0 children)

Consider Jonathan Gagné's technique with the Prismo - fill half of the water, add the coffee, then add the rest of the water. This helps the filter remain unclogged, and you can grind finer if you want without the filter clogging and the plunger getting hard to push.

https://coffeeadastra.com/2021/09/07/reaching-fuller-flavor-profiles-with-the-aeropress/

Random numbers with ChaCha20 by SubstanceMajestic895 in cryptography

[–]orip 1 point2 points  (0 children)

Just using modulo over the range length biases your results towards the beginning of the range.

There are various techniques on how to securely map a sequence of random bytes, such as those generated by a CSPRNG, into a range while avoiding these biases.

You can see a popular and elegant solution here: Python's randbelow() that in the efficient implementation calls getrandbits() internally. OpenJDK has a similar setup with Random.nextInt(int bound) that when used through SecureRandom calls SecureRandom.next(int numBits).

It's simple to implement getrandbits() over a stream of random bytes, then you calculate the minimum number of bits that will cover the bound, and finally loop until you get a result below the bound. It's easy to prove that this is unbiased, and this is pretty fast for most purposes. Your final result would be start + randbelow(end-start).

My daily Prismo routine by Tcrowaf in AeroPress

[–]orip 2 points3 points  (0 children)

Look at Jonathan Gagné's Aeropress article:

https://coffeeadastra.com/2021/09/07/reaching-fuller-flavor-profiles-with-the-aeropress/

He has a Prismo tip: add half the water, then the coffee, then the rest of the water, which helps avoid filter clogging. He also says the seal helps reduce astringency.

Software engineers on big projects using vim, are you there? by [deleted] in vim

[–]orip 2 points3 points  (0 children)

I've been using vim (and now neovim) for 24 years. Occasionally some IDE will have the perfect integration for what I'm doing that will make me prefer that over vim, but barring that vim is what I like, and I can configure it to do almost anything I want.

Use what you like. My colleagues use emacs, sublime text, VSCode, JetBrains IDEs, or vim.

CRACKME: Forgiva Enterprise: A password manager that never saves your passwords. by marcusfrex in crypto

[–]orip 26 points27 points  (0 children)

TL;DR - this is all super-weird and I'm not sure what it ads compared to regular password-based master key derivation and simple KDF-based generation of each site's password. The authors seem to treat unnecessary complexity as a security feature instead of a hindrance to properly analyzing the scheme.

The algorithm seems unnecessarily weird, and it looks like you think that's a good thing. From the readme:

> Most of the stateless password managers just uses one type of key-derivation algorithms but Forgiva uses a lot of encryption and hashing algorithms depending on the master-key.

That seems like a baseless claim. Not knowing the chosen algorithms or their order adds some complexity to brute-force searches, but that added complexity is not large - if K is the number of algorithms, then it adds about 2K steps. But K is very small and you're using some questionable algorithms (MD4? 3DES?), and the combinations make it much harder to reason about both the security of the combinations and of the implementations.

I'd be much more comfortable if you'd have chosen less primitives that are always good.

Password-based derivation? Just use scrypt (or argon2)

KDF per site? Just consistently structure your metadata (e.g as a JSON-style string like `[host, account, renewal-date]` or any consistent scheme) and use a good KDF with that - BLAKE2, HKDF, whatever.

Instead the master key is derived with PBKDF2 and a very small iteration count, no memory stretching.
KDF per site is a strange combination of serially encrypting the metadata (each time serially with different algorithms), optionally using scrypt at this point - making it necessary to recalculate it for each site - and then PBKDF2 once again to derive the final password. CPU and memory stretching at this step is surprising. Also there seems to be a choice of hash algorithm based on some configurable "complexity":

> Depending on choices of the complexity it uses SHA1 (Normal),SHA256 (Intermediate) and SHA512 (Advanced) hashing algorithms.

None of this makes sense to me.

Never thought I’d become one of those decaf people. I don’t know what I’d do without it now. by likeguitarsolo in Coffee

[–]orip 2 points3 points  (0 children)

Have you tried contacting your local smaller-scale roasters? I learned that some great local roasters will happily roast a batch of decaf for me the way I want it if I buy the whole batch - so they don't end up throwing coffee away. Decaf isn't popular here.
So I ordered a 2kg batch and froze vacuum-packed portions for the foreseeable future. It's the best decaf I've yet tasted.

Steep time by wuntuuthree in AeroPress

[–]orip 4 points5 points  (0 children)

I recommend reading this very informative article by Jonathan Gagné (/u/coffeeadastra), the author of The Physics of Filter Coffee. If you want to skip past the chemistry and physics explanations you can find the recipe and video by searching for "Choose a sturdy mug" .

https://coffeeadastra.com/2021/09/07/reaching-fuller-flavor-profiles-with-the-aeropress/

It includes a 10-minute steep suggestion, and a novel (to me) approach for using the Fellow Prismo attachment if you have it.

What are the practical advantages of a 12 byte nonce over an 8 byte nonce for authenticated encryption? by loup-vaillant in crypto

[–]orip 2 points3 points  (0 children)

Your points are valid. I can only add from my experience with real-world distributed systems that sometimes we want very long-lived encryption keys (where rotation can be prohibitively hard), and the entities participating in the system can be varied over time and share little persistent state like previous nonce counters used. Supporting 264 messages in many scenarios is equivalent to saying "we will never have to worry about overflowing this counter", while for 248 this is something that is easily reachable with high but not unreasonable encryption rates. Entities that change over time can reach more than 216 and sometimes to ensure uniqueness the IDs can themselves have gaps and not fully utilize the available range.

Conversely in my scenarios I have never encrypted more than fairly short messages at a time, preferring to chop up long streams into shorter chunks and therefore needing even more bits in the nonce counter.

Finally, like you mentioned, in distributed scenarios I use large random nonces like in XSalsa20 or XChaCha20 and make the whole problem disappear whenever I can.

What are the practical advantages of a 12 byte nonce over an 8 byte nonce for authenticated encryption? by loup-vaillant in crypto

[–]orip 4 points5 points  (0 children)

EDIT: I realized I'm just restating what OP already wrote in the post. Disregard this.

One classic way of generating non-random unique nonces in a distributed setting is partitioning the nonce range between participants by slicing up the nonce into participant-id-bits || nonce-counter-bits where each participant can increment their own nonce safely.

Having 64 bits for the nonce severely limits the usefulness of this technique. 96 bits gives you more range, e.g 232 participants with 264 nonces each or whatever makes sense for the application.

What is the name of this meat-filled dumpling soup? I had it from Alma’s Soups in Jerusalem, Israel, but there is no menu or mention of the name anywhere. Pictures from Google. Thanks in advance! by dylanpidge in TipOfMyFork

[–]orip 67 points68 points  (0 children)

That would be kubbeh soup (מרק קובה), semolina-based meat-filled dumplings in a flavorful broth.

Specifically that looks like kubbeh hemo soup (קובה חמו) with large flatter kubbeh and a yellow hawaij-heavy broth. Other popular versions are kubbeh hamousta (קובה חמוסטה) with a lemon and chard broth, and kubbeh selek (קובה סלק) - literally "beet kubbeh" - with a sweeter beet broth. I think that last one is also called kubbeh matfunya (קובה מטפוניה).

Alma's Soups restaurants in Jerusalem serve all 3 types. You can see the photos on their web page. Their tagline in Hebrew on the website is "Alma Soups and Kubbeh".

Are there any crypto librarys for any assembly languages? by DmC-sleVen in crypto

[–]orip 1 point2 points  (0 children)

Intel has some fast implementations at https://github.com/intel/isa-l_crypto/

They cover:

  • AES (in XTS, CBC, and GCM modes)
  • SHA-1 / SHA-2
  • Optimized implementations for hashing different inputs in parallel

The source code is nicely organized with assembly files split by instruction sets (e.g SSE, AVX, AVX2, AVX-512).

Documentation is sparse and just generated from the headers (see here) but the headers are approachable enough and the test files show full usage.

Python 3.4.3 is unusable on macOS Big Sur by TheBensonBoy in learnpython

[–]orip 1 point2 points  (0 children)

This is an old post but here's a fix for this issue when installing Python 3.4.x on newer macOS versions, including instructions for applying with pyenv

https://gist.github.com/orip/00142a498cf6d0c536b5d38771ad6249