docs: add XML documentation for modern asymmetric key-pair generators (Batch 10)#681
Open
KonradSop wants to merge 1 commit into
Open
docs: add XML documentation for modern asymmetric key-pair generators (Batch 10)#681KonradSop wants to merge 1 commit into
KonradSop wants to merge 1 commit into
Conversation
Document the seven IAsymmetricCipherKeyPairGenerator implementations that pair with the modern asymmetric parameter classes: MLKem, MLDsa, SlhDsa, Ed25519, Ed448, X25519, X448. Adds class-level summaries citing FIPS 203 / FIPS 204 / FIPS 205 / RFC 8032 / RFC 7748 and per-method <summary>, <param>, <returns>, and <exception> tags for the Init and GenerateKeyPair surface. The three PQC generators also pick up a missing 'using System;' so the InvalidCastException cref raised by Init resolves cleanly; no other source changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds XML documentation to the seven key-pair generators that pair with the parameter classes covered by PRs #673 (Batch 5), #677 (Batch 7), #678 (Batch 8) and #679 (Batch 9):
MLKemKeyPairGenerator— class summary citing FIPS 203;Initdocuments theInvalidCastExceptionraised when the suppliedKeyGenerationParametersis not anMLKemKeyGenerationParameters;GenerateKeyPairnotes theSeedAndEncodingformat used for the produced private key.MLDsaKeyPairGenerator— same shape as ML-KEM, citing FIPS 204.SlhDsaKeyPairGenerator— class summary citing FIPS 205;GenerateKeyPairnotes that the threen-byte seeds (SK.seed,SK.prf,PK.seed) are drawn from theSecureRandomand that the hypertree root is computed up front.Ed25519KeyPairGenerator/Ed448KeyPairGenerator— class summaries citing RFC 8032;Init/GenerateKeyPairdocumented; class summary notes the seed size (32 / 57 bytes).X25519KeyPairGenerator/X448KeyPairGenerator— class summaries citing RFC 7748;Init/GenerateKeyPairdocumented; class summary notes the clamped scalar size (32 / 56 bytes).Key Accomplishments
KeyGenerationParametersalready documented (Batches 5/7/8/9 and docs: add XML documentation for ML-KEM and ML-DSA parameter gaps (Batch 9) #679), the matchingIAsymmetricCipherKeyPairGeneratorimplementations now carry the same level of XML coverage.<exception cref="InvalidCastException"/>only added on the three PQC generators whoseInitperforms the cast; the four EdDSA/X-DH generators only captureSecureRandomso they don't throw.using System;to the three PQC generator files so the newInvalidCastExceptioncref resolves cleanly. No other source changes.feature/modern-curves-docs(Batch 7),feature/slh-dsa-docs(Batch 8) andfeature/ml-pqc-gaps-docs(Batch 9). The recent5cdc6f51 Refactor Falcon key parameter classesupstream commit does not touch any of these files.Verification
dotnet build crypto/src/BouncyCastle.Crypto.csproj -c Release— succeeded onnet6.0,netstandard2.0,net461with no new warnings (the remaining warnings are pre-existing in unrelated files).using System;directives needed for theInvalidCastExceptioncref.Checklist before requesting a review
See also Contributing Guidelines.