Commit 6b64772
Provide RFC 3394 default IV explicitly for AES key wrap
openssl 0.10.80 enforces that any cipher with a defined IV must have one
supplied explicitly — passing `None` panics at runtime with
"an IV is required for this cipher" inside `Crypter::new` / `decrypt`
(see openssl-rs/symm.rs around the IV-required check).
The two call sites here are in the RFC 6637 OpenPGP key-wrap helpers and
both go through AES Key Wrap (RFC 3394). RFC 3394 §2.2.3.1 defines the
"default initial value" for the wrap function as the constant
`A6A6A6A6A6A6A6A6`, used when no Alternative Initial Value is supplied.
Pass that constant explicitly so the cipher contract is satisfied without
changing the wire-level behaviour (the byte stream produced/consumed on
the network is identical to what older openssl versions did when `None`
was passed).
Reproduces with the export-findmy tool against any CloudKit zone that
returns PCS-encrypted records (e.g. the FindMy BeaconStore zone) when
built against current openssl crate releases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 9919063 commit 6b64772
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | | - | |
| 1621 | + | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
| |||
0 commit comments