Better HN
topnewbestaskshowjobs
Log inSign up

nmadden

507 karma · joined Jun 20, 2015 (11y ago) · 247 submissions

Author API Security in Action - https://www.manning.com/books/api-security-in-action

https://neilmadden.blog/about

[ my public key: https://keybase.io/neilmadden; my proof: https://keybase.io/neilmadden/sigs/QfrQtB7H1Ni4rhaFpENFBtqqCd-VYDYXqYHKRfojHnk ]

Submissions

comment 2y ago · link · parent

I took tptacek’s comment as implying that ZTNA solutions do do microsegmentation. Otherwise, if I get a shell in one app and have access to the entire network then what was the point of any of it? Are you saying they don’t do microsegmentation?

comment 2y ago · link · parent

Oh ok. I’ve been reading a lot of zscaler zpa docs at work and didn’t come away with that impression at all. (The Zscalar docs are awful though).

comment 2y ago · link · parent

I don’t really get the threat model of these “zero trust” appliances and how they are really different from a VPN. Can someone explain it to me? It still looks very much like a perimeter.

comment 2y ago · link · parent

With respect to IND-CCA, it doesn’t matter. Neither is compatible.

comment 2y ago · link · parent

In Tcl there is an idiom to do things like

    some_func $value[set value “”]
where the [set value “”] bit reduces the refcount. There’s also a fairly widespread idiom of using the K combinator for this[1]:

    some_func [K $value [set value “”]]
It’s one of those things that has become second-nature to people in-the-know, but is a total headscratcher otherwise.

[1]: https://wiki.tcl-lang.org/page/K#c2a6014c2d129837889d8a8000d...

comment 2y ago · link · parent

> The real thing exists largely because it makes proofs easier.

I would not say that. It exists because practical padding oracle attacks (which are adaptive CCA) have been known for decades. CCA2 very much captures real-world attacks. Is there any realistic attack that is captured by CCA1? (Or vCCA).

Padding oracle attacks also generalise to any kind of parsing after decryption. Padding tends to be studied because it is independent of any particular format/application and also part of several encryption scheme definitions. The definition of CCA2 captures very realistic scenarios - almost all applications do some parsing after decryption and so are quite likely to reveal an oracle. Would vCCA also capture such attacks?

comment 2y ago · link · parent

Right, but IND-CCA1 is kind of a toy security goal though. A sort theoretical consolation prize if you can’t achieve the real thing. And AFAICT, no actually implemented schemes do obtain even CCA1?

comment 2y ago · link · parent

I don’t know how Swift and Koka handle things, but I’ve written a lot of Tcl that uses the same CoW reference-counting trick. (Tcl is an under-appreciated FP language: everything is a string, and strings are immutable, so it has had efficient purely declarative data structures for decades).

The downside in Tcl is that if you refactor some code suddenly you can add a new reference and drop into accidentally quadratic territory because now everything is being copied. This leads to some cute/ugly hacks that are only explainable in terms of interpreter implementation details, purely to reduce a refcount in the right spot.

comment 2y ago · link · parent

The thing that I always want to know with FHE: the gold standard of modern encryption is IND-CCA security. FHE by definition cannot meet that standard (being able to change a ciphertext to have predictable effects on the plaintext is the definition of a chosen ciphertext attack). So how close do modern FHE schemes get? ie how much security am I sacrificing to get the FHE goodness?

comment 2y ago · link · parent

There’s a lot to say about the problems of JWTs, but they absolutely are extremely widely used for access tokens, and by many big players (Microsoft, Okta, etc). The JWT RFC is a product of the OAuth working group.

comment 2y ago · link · parent

So just X25519 then?

comment 2y ago · link · parent

If a single point matches the curve equation of a well-known curve then that’s pretty compelling evidence.

comment 2y ago · link · parent

The About page doesn’t say anything about whether it was peer-reviewed or not (nor supplies any evidence that the author is “distinguished”). Maybe it was peer-reviewed and rejected, hence why a “distinguished” researcher would resort to self publishing? It seems to contradict other much larger-scale studies like https://www.nature.com/articles/s41562-017-0277-0

comment 2y ago · link · parent

What is this? Is it a preprint or a peer-reviewed article? A blog?

comment 2y ago · link · parent

> NIST has finally understood that complex password requirements decrease security, because nobody is attacking the entrophy space - they are attacking the post-it note/notepad text file instead.

Actually NIST provide a detailed rationale for their advice [1]. Attackers very much are attacking the entropy space (credential stuffing with cracked passwords is the #1 technique used in breaches). But password change and complexity rules are pointless precisely because they don’t increase the entropy of the passwords. From NIST:

> As noted above, composition rules are commonly used in an attempt to increase the difficulty of guessing user-chosen passwords. Research has shown, however, that users respond in very predictable ways to the requirements imposed by composition rules [Policies]. For example, a user that might have chosen “password” as their password would be relatively likely to choose “Password1” if required to include an uppercase letter and a number, or “Password1!” if a symbol is also required.

[1]: https://pages.nist.gov/800-63-3/sp800-63b.html#appA

comment 2y ago · link · parent

The article links to this study, and the diagrams seem to be adaptations of figure 4. https://www.dropbox.com/scl/fi/4tyqsnuof548f1wio7dgf/Factors...

Edit: I don’t think cotton is the best replacement. I’m no expert, but I think hemp, flax, and tencel are the “best” replacements in terms of sustainability.

comment 2y ago · link · parent

Well, wool is particularly bad, emitting way more greenhouse gases than most other textiles for equivalent fabric output. And sheep farming has quite a shocking impact on biodiversity.

https://www.vox.com/future-perfect/24008053/wool-marketing-e...

comment 2y ago · link · parent

I agree with the thrust of your argument, but I just want to point out that wool is not environmentally neutral. Sheep are incredibly destructive and have historical caused a lot of degradation of habitats.

https://www.monbiot.com/2013/05/30/sheepwrecked/

79.

Machine Learning and the Triumph of Gofai(neilmadden.blog ↗)

1 points · by nmadden · 2y ago · discuss

comment 2y ago · link · parent

Elliptic curve crypto is not post-quantum. (Indeed it’s likely to be broken before RSA if cryptographically relevant quantum computers occur).

comment 2y ago · link · parent

One of the nice things about Tufte-Latex is that refs get put into margin notes right at the point of reference.

Edit: example https://mirror.apps.cam.ac.uk/pub/tex-archive/macros/latex/c...

comment 2y ago · link · parent

I don’t remember much about the specifics of OCB. But the xchacha/xsalsa20 approach is completely generic, so can be applied to any cipher: effectively just run a large nonce through a PRF to derive a fresh key for each message.

comment 2y ago · link · parent

(Article author here).

Being able to see if two messages are equal means that it doesn’t even achieve IND-CPA security (when nonces repeat). Although this may seem like a small loss of security, it can have significant consequences. For example, when you are performing encryption of long messages, you generally want to split them into smallish chunks -- otherwise you’ll likely have to release unverified plaintext during decryption unless you buffer the entire message in memory. But now if your AEAD reveals message equality, like AES-GCM-SIV does under nonce reuse, then an attacker can see when chunks are equal if you are not careful. So you can end up vulnerable to the kind of chosen plaintext attacks that are devastating against ECB encryption.

Phillip Rogaway, co-inventor of the original SIV mode and the MRAE security model, discusses BEAST-style chosen plaintext attacks against online encryption modes using MRAE schemes in https://eprint.iacr.org/2015/189.pdf. As he says in that paper: "The paper defining MRAE never suggested that nonce-reuse was OK.” It leads to security weaknesses, and AES-GCM-SIV has increasing likelihood of nonce reuse after 2^32 messages.

So, yes, AES-GCM-SIV is a lovely piece of work, but if you want to encrypt large numbers of messages with a single key, then you need to be very aware of the security definitions. I wouldn’t recommend it for general use.

comment 2y ago · link · parent

I did some work with Rete for my undergraduate dissertation. One thing I remember about the original paper is that it defines the algorithm in terms of a kind of virtual machine, where specific instructions implement the matching process. I’ve never seen anyone implement it that way.

comment 2y ago · link · parent

And then you find out about special soundness and that this is not only expected behaviour, but crucial to the security definitions and you realise that signatures are absolutely cursed.

comment 2y ago · link · parent

Do they do attestation by default? I thought for Apple at least that was only a feature for enterprise managed devices (MDM). Attestation is also a registration-time check, so doesn’t necessarily constrain where the passkey is synced to later on.

comment 2y ago · link · parent

Well, SQIsign signatures are about the same size (204 bytes) than RSA-2048 (256 bytes). So ok, but most people who care about size on the wire have moved to EC sigs, which are much smaller (64 bytes). And “fast to verify” is not really true: 50ms is not fast — both RSA and Ed25519 signature verification is <0.1ms.

comment 2y ago · link · parent

Well, there are PQC (public key) signature schemes based on hash functions, but they all have large signatures (in the multi-kB range) and other drawbacks (eg being stateful).

Moving to a MAC is also not a crazy idea in a lot of deployments. You can horizontally scale an internal MAC validation service. I believe Facebook use MAC-based tokens internally (CATs).

comment 2y ago · link · parent

Oops, that’s a typo.

comment 2y ago · link · parent

I wrote about putting secrets in URLs a few years ago: https://neilmadden.blog/2019/01/16/can-you-ever-safely-inclu...
12345
9