Repository navigation
v0.8.0
Highlights
xmlenc1 loses its experimental label (#1413). It gained ECDH-ES encryption, Encryptor.EncryptBytes / Decryptor.DecryptBytes, xenc:CipherReference and same-document RetrievalMethod resolution, SHA-224 support, and a long run of hardening: bounded CipherValue, EncryptedKey, OAEPparams, ConcatKDF and EC-key decoding, constant-time key-unwrap integrity checks, and cancellation observed during parsing and canonicalization.
schematron implements the queryBinding attribute, and validation of large documents is dramatically faster: it no longer rebuilds the document-order index on every expression, so validation is linear rather than quadratic in document size. The 10,000-record case from #1420 drops from 668 s and 425 GB allocated to 232 ms and 154 MB. xpath1 and xpath3 both benefit, since the document-order machinery is shared.
Upgrading
xmlenc1 wire structs are no longer exported (#1390). EncryptedData, EncryptedKey and EncryptionMethod are now internal to the package; use Encryptor and Decryptor instead. Code that referenced those types will not compile.
DefaultBlockAlgorithm changed value (#1354), from the XML Encryption 1.0 aes256-gcm URI to the standard XML Encryption 1.1 one. An Encryptor that does not set a block algorithm now writes the 1.1 URI. Set it explicitly with Encryptor.BlockAlgorithm to keep the old output, and note that Decryptor.BlockAlgorithm now accepts an out-of-band algorithm too.
xmlenc1 refuses retired crypto (#1404), and parses more strictly: it validates EncryptionMethod children (#1411), requires RetrievalMethod URIs (#1412), rejects conflicting key material and duplicate KeyInfo/EC nodes, refuses a non-XML @Type in Decrypt, and no longer reads CarriedKeyName. Documents that relied on any of that are now rejected rather than silently accepted. Triple DES remains available as a documented exception. CBC padding is read the way xmlenc-core1 writes it (#1397), with Decryptor.StrictPKCS7Padding to opt into strict checking.
schematron now reads the queryBinding attribute instead of ignoring it, and refuses a binding it does not implement. A schema carrying queryBinding="xslt2", "xpath2", "xquery", "exslt", "stx", or any other unrecognized value compiled and validated on v0.7.0; it now fails compilation with schematron.ErrUnsupportedQueryBinding. Accepted values are the ones ISO/IEC 19757-3 defines and this release implements: an absent attribute or xslt (Annex C) evaluates with XPath 1.0, and xslt3 (2020 Annex J) or xpath3 (2020 Annex K) evaluates with XPath 3.1. To keep the old lenient behavior for a schema whose binding you cannot change, force it:
schema, err := schematron.NewCompiler().
QueryBinding(schematron.QueryBindingXPath1).
CompileFile(ctx, "rules.sch")Two XSD 1.0 fixes change validation verdicts (#1389, #1392). Attribute inheritance and duplicate attribute use on an extension are now handled correctly, so a schema that previously compiled or validated may now be reported as invalid.
New resource caps are opt-in through Decryptor.MaxCipherValueBytes and Decryptor.MaxEncryptedKeyBytes, defaulting to DefaultMaxCipherValueBytes (10 MiB) and DefaultMaxEncryptedKeyBytes (64 KiB).
What's Changed
- finalize v0.7.0 conformance timeline by @lestrrat in #1315
- add xmldsig verifier fuzzing by @lestrrat in #1317
- gate releases on xmldsig suites by @lestrrat in #1316
- add xmldsig production guidance by @lestrrat in #1318
- snapshot xmldsig1 transforms on ingress by @lestrrat in #1319
- add Manifest validation cancellation coverage by @lestrrat in #1320
- clarify xmldsig newline contract by @lestrrat in #1321
- update xmldsig1 security status by @lestrrat in #1322
- add XML Encryption conformance wiring by @lestrrat in #1323
- add XML Encryption timeline history by @lestrrat in #1324
- support XML Encryption 1.1 RSA vectors by @lestrrat in #1325
- support XML Encryption 1.1 ECDH-ES by @lestrrat in #1326
- docs: add v0.8.0 conformance results by @lestrrat in #1327
- remove stale xslt3 planning docs by @lestrrat in #1328
- docs: remove slow-test history by @lestrrat in #1329
- docs: remove release-gate incident history by @lestrrat in #1330
- docs: remove old feature-evidence example by @lestrrat in #1331
- docs: refresh XSD 1.1 evidence by @lestrrat in #1332
- chore: remove redundant XMLDSig design doc by @lestrrat in #1333
- feat: add xmlenc1 Encryptor.EncryptBytes by @lestrrat in #1337
- fix: make zero-value xmlenc1 builders usable by @lestrrat in #1334
- feat: add xmlenc1 ECDH-ES encryption by @lestrrat in #1339
- fix: make xmlenc1 errors actionable and consistent by @lestrrat in #1335
- fix: reject conflicting xmlenc1 key protection by @lestrrat in #1336
- docs: document xmlenc1 API contracts and fields by @lestrrat in #1338
- fix: apply xmlenc1 key cap with session key by @lestrrat in #1340
- fix: reject every conflicting xmlenc1 key pair by @lestrrat in #1341
- fix: bound xmlenc1 EncryptedKey ciphertext work by @lestrrat in #1343
- bound xmlenc1 ConcatKDF OtherInfo size by @lestrrat in #1342
- bound xmlenc1 OAEPparams decoding by @lestrrat in #1345
- accept childless entity ref in OAEPparams by @lestrrat in #1347
- charge xmldsig1 base64 before materializing by @lestrrat in #1346
- Bump actions/stale from 10.4.0 to 11.0.0 by @dependabot[bot] in #1344
- fix xmlenc CipherValue child parsing by @lestrrat in #1348
- limit xmlenc payload CipherValue bytes by @lestrrat in #1350
- fix xmlenc cancellation handling by @lestrrat in #1349
- add xmlenc1 CipherValue entity-ref tests by @lestrrat in #1351
- observe cancellation in the xmlenc1 parse by @lestrrat in #1352
- cap the xmlenc1 OAEP label on encrypt by @lestrrat in #1355
- bound the xmlenc1 EC public key decode by @lestrrat in #1358
- emit xmlenc1 OAEPparams before wildcards by @lestrrat in #1353
- default to the standard xmlenc11 GCM URI by @lestrrat in #1354
- document the xmlenc1 spec gaps by @lestrrat in #1356
- feat: accept out-of-band xmlenc1 block algorithm by @lestrrat in #1357
- stop reading the xmlenc1 CarriedKeyName by @lestrrat in #1359
- read KeyInfo base64 as character data by @lestrrat in #1361
- correct inaccurate xmlenc1 statements by @lestrrat in #1360
- harden xmlenc1 test assertions, add decrypt fuzz by @lestrrat in #1362
- cap xmldsig1 decimal big.Int digit counts by @lestrrat in #1363
- validate the xmlenc1 key-wrap settings early by @lestrrat in #1364
- share one bounded base64 walk in xmlenc1 by @lestrrat in #1365
- bound the xmldsig1 XPath filter expression by @lestrrat in #1366
- Bump github/codeql-action from 4 to 4.37.3 by @dependabot[bot] in #1367
- Bump github/codeql-action from 4.37.3 to 4.37.4 by @dependabot[bot] in #1368
- Bump github/codeql-action from 4.37.4 to 4.37.6 by @dependabot[bot] in #1369
- fix(xmlenc1): reject nil elements without panicking by @lestrrat in #1370
- docs(xmlenc1): align EncryptedData.Type behavior by @lestrrat in #1371
- fix(xmlenc1): wrap unsupported block algorithm errors by @lestrrat in #1372
- fix(xmlenc1): classify nil document errors by @lestrrat in #1373
- fix(xmlenc1): validate algorithms before payload work by @lestrrat in #1374
- fix(xmlenc1): cap encrypted-key candidates during parsing by @lestrrat in #1375
- reorganize root package tests by @lestrrat in #1376
- use constant-time compare for key unwrap integrity by @lestrrat in #1378
- fix(xmlenc1): reject duplicate KeyInfo/EC nodes by @lestrrat in #1380
- fix(xmlenc1): wrap KeySizeError in decrypt by @lestrrat in #1381
- correct xmlenc1 README security claims by @lestrrat in #1379
- fix(xmlenc1): check KeySize against algorithm by @lestrrat in #1383
- fix(xmlenc1): qualify README error sentinel claims by @lestrrat in #1384
- refactor(xmlenc1): reference groundwork by @lestrrat in #1385
- docs(xmlenc1): reframe the conformance scope by @lestrrat in #1386
- feat(xmlenc1): resolve same-doc RetrievalMethod by @lestrrat in #1387
- fix(xsd): attribute inheritance in XSD 1.0 by @lestrrat in #1389
- feat(xmlenc1): resolve xenc:CipherReference by @lestrrat in #1388
- unexport the xmlenc1 wire structs by @lestrrat in #1390
- fix xsd 1.0 duplicate attr use on extension by @lestrrat in #1392
- fix(xmlenc1): trim only XML space in ConcatKDF hex by @lestrrat in #1393
- fix(xmlenc1): refuse a non-XML @type in Decrypt by @lestrrat in #1394
- fix(xmldsig1): bound canonicalization node set by @lestrrat in #1391
- gate releases on the xmlenc11 suite by @lestrrat in #1395
- name every gated suite in the release header by @lestrrat in #1396
- read CBC padding the way xmlenc-core1 writes it by @lestrrat in #1397
- name the Triple DES exception up front by @lestrrat in #1398
- note the Triple DES exception in the main README by @lestrrat in #1399
- state the docs positively by @lestrrat in #1400
- name the refusal of an xenc11:DerivedKey by @lestrrat in #1401
- drop the unreachable ErrInvalidPadding by @lestrrat in #1402
- let the error structs grow, align nil operands by @lestrrat in #1403
- claim xmlenc-core1, refuse retired crypto by @lestrrat in #1404
- document outer AgreementMethod, pin ErrMissingKey by @lestrrat in #1405
- stop xmlenc1 cipherref canonicalize on cancel by @lestrrat in #1407
- widen xmldsig1 timing margins for CI runners by @lestrrat in #1409
- chore(deps): bump golang.org/x/text from 0.40.0 to 0.41.0 by @dependabot[bot] in #1408
- close xmlenc1 resolver stream leak on error by @lestrrat in #1406
- add XML Encryption SHA-224 support by @lestrrat in #1410
- validate EncryptionMethod children by @lestrrat in #1411
- require RetrievalMethod URIs by @lestrrat in #1412
- remove xmlenc1 experimental label by @lestrrat in #1413
- chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 by @dependabot[bot] in #1414
- chore(deps): bump github/codeql-action from 4.37.6 to 4.37.7 by @dependabot[bot] in #1415
- chore(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by @dependabot[bot] in #1416
- reorganize root package tests by @lestrrat in #1417
- reorganize xslt3 tests by @lestrrat in #1418
- chore(deps): bump github/codeql-action from 4.37.7 to 4.37.8 by @dependabot[bot] in #1419
- add sponsors section to README by @lestrrat in #1422
- implement schematron queryBinding by @lestrrat in #1421
- measure v0.8.0 into the conformance timeline by @lestrrat in #1427
Full Changelog: v0.7.0...v0.8.0