@emenel the benchmarks which....are on the other last page https://eprint.iacr.org/2025/078.pdf
7.2 Effect of Chunk Encoding on Communication Costs
like sir. you can't say cost without a model. you are a cryptographer

At Open Whisper Systems, we’ve been developing open source “consumer-facing” software for the past four years. We want to share some of the things we’ve learned while doing it. As a software developer, I envy writers, musicians, and filmmakers. Unlike software, when they create something, it is...
@emenel he obviously misses the p2p possibility. he says "federated" because federated is very easy to capture (see: mastodon).
i realized double ratchet was doing a lot of stuff like a more standard network protocol => QUIC is just double ratchet
@emenel the sqlite db for signal is because apps have restricted access to anything. what it provides is mapping from the byte serialization of a pubkey to the associated sessions. and in fact, i think i found that kinda wrong even for my prototype, since each session is distinct from the originating identity (bc each DH handshake is another set of completely new keypairs). in fact, i forget whether the identity key is even exposed at all........because i was also using the sealed sender approach which does tag with the sender id (but encrypted with another key)
sealed sender is kind of a hack for the server model and what i analogized to onion routing (onion packing?) works both ways, no new crypto
@emenel sorry the reason i mention all this is because double ratchet message chains having forward secrecy is something the pgp approach needs and we can do safely (not quickly or easily, but it's mature enough now imo)
there is another goal after that
@emenel and it ends up being a whole thing, but basically anonymity is possible and not difficult to codify and cryptographers don't wanna do it, because academic crypto is boring and also captured
and the work i can find on tor and i2p does not have any theory of this--the i2p paper i could find was terrible and i doubt it was representative.
but anonymity and ddos resistance are.....not in conflict
net@emenel which is: you can maintain these negotiated sessions with specific peers through completely ephemeral identities, and define a source routing protocol through them. this is bootstrappable, so you can discover peers from B->C, C->D, further--although at this point it becomes significant to distinguish:
maybe more or less. but this is not yet quite enough
@emenel but with source routing you can define this onion-linked chain where everyone says yeah i went to the key signing party and nobody knew you, because "you" are an abstraction, and you can ask them for updates on the status of your datagram.
btw: datagram = fixed-size as pouzin defined it. vint cerf intentionally took his wordings and twisted them to mean things that don't make sense
@emenel so like i mentioned there like vaguely gesturing to tons of cryptographic handshakes or some shit. i have a fuller sketch of some of them. but this is pouzin, in 1976, describing basically the above, without reference to anything except node relationships
Indeed, neither VC's nor DG's can carry within a
single packet messages longer than the maximum
length of the data field (this is a tautology). Therefore, oversized messages are fragmented into > pieces the size of a data field and sent as separate > DG's.
At the destination, DG's are reassembled into a copy
of the original message. Duplicates, if any, are discarded ; missing DG's will be retransmitted if acknowledgment conventions have been established with the sender.
the ability to model the network explicitly and represent trust relationships is i think why i independently arrived at this methodology
@emenel basically like. being evil does reduce the adversary's ability to do metacognition. but unfortunately we have to assume there is an evil NSA team that does all this and works very hard so people can't do this
but also cryptography works no matter how smart someone is. and also intelligence is fake
but defining these categories of anonymity attacks will take a while. i have a kind of hope that it's "basically cryptographic measures" (e.g. timing attacks, where there is some practical precedent for e.g. not leaking identity key), and the identity of the message and the sender is just.....part of the ciphertext
@emenel @haskal i still think he sounds like me when i don't have a concrete use case for this part though
Another difference is that while authentication can happen at the key exchange level, and the derived shared symmetric key can be used with STREAM as age does, signatures need to be necessarily computed over the whole message. This sets us back on making the format seekable and streamable: either we make an expensive asymmetric signature for every chunk, or we get fancy with signed Merkle trees, which anyway get us a streamable format only either in the encryption or in the decryption direction. (Or, like discussed above, we just stick a signature at the end and release unverified plaintext at decryption time, causing countless vulnerabilities.)
particularly this part
This sets us back on making the format seekable and streamable
@emenel @haskal lmao he's so funny
We made it a good UNIX tool, working on pipes
sir i do build tools that is literally THE problem i know of 3 individuals working on incl me. none of us have solved it we just like ponder it
One thing we decided is that we’d not include signing support. Signing introduces a whole dimension of complexity to the UX
hmmmm shit (1) he's right except (2) key management is an interesting framing and indicates his tool is doing too much in a different way.
ok here i wouldn't say "too much" necessarily. but like. "key management" is a really high-level task
i do worry that "only curve25519" (fuck djb) could introduce unexpected assumptions elsewhere that aren't tested. but modifying the type of key is not the way to test them. and it's actually pretty sick to have:
generate symmetric key w salt (+entropy [effect])
soooooo what about cases that don't support a session-like context?
the docstring for the single struct in aes_ctr.rs:
/// A wrapper around [`ctr::Ctr32BE`] that uses a smaller nonce and supports an initial counter.
pub struct Aes256Ctr32(ctr::Ctr32BE<Aes256>);
yes, i can see that
literally what
#[derive(displaydoc::Display, thiserror::Error, Debug)]
pub enum Error {
/// "unknown {0} algorithm {1}"
UnknownAlgorithm(&'static str, String),
/// invalid key size
InvalidKeySize,
/// invalid nonce size
InvalidNonceSize,
/// invalid input size
InvalidInputSize,
/// invalid authentication tag
InvalidTag,
}
this is not the appropriate use of displaydoc fuckboys
thiserror. just impl error::Error. how is this real(1) completely unrelated to the SPQR fuckboys
(2) 2021????
(3) fuckboy #2 "adding support for username links"
https://github.com/signalapp/libsignal/commit/e50bec648fed7d6f87648c2c7937a9eeda3841b3
COMPLETELY half-assed
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::UnknownAlgorithm(typ, named) => write!(f, "unknown {} algorithm {}", typ, named),
Error::InvalidKeySize => write!(f, "invalid key size"),
Error::InvalidNonceSize => write!(f, "invalid nonce size"),
Error::InvalidInputSize => write!(f, "invalid input size"),
Error::InvalidTag => write!(f, "invalid authentication tag"),
Error::InvalidState => write!(f, "invalid object state"),
}
}
}
this is actually much better for a !!!!cryptographic!!!!! error!!!!!
completely did not change the messages, or cases, just fucking removed Clone/Eq/PartialEq which sure that's not a correctness issue but why? why?
#[derive(Debug, displaydoc::Display, thiserror::Error)]
pub enum DecryptionError {
/// The key or IV is the wrong length.
BadKeyOrIv,
/// These cases should not be distinguished; message corruption can cause either problem.
BadCiphertext(&'static str),
}
brb distinguishing your cases
bro says i know. i know what to do
signal-crypto = { path = "../crypto" }
our problem? too much crypto.......not enough signal crypto
same code
i would not accept this at all for any professional work
i would have given my undergrad students maybe a B if it passes all the tests and i gave them the context for them to solve
if it was a junior eng i would totally req to pair and it would be cool as hell and i would learn what kinds of criteria they were familiar with / assuming judged upon