docs: add XML documentation for modern asymmetric signers and X-DH agreement (Batch 11)#682
Open
KonradSop wants to merge 1 commit into
Open
Conversation
…reement Document the seven ISigner implementations and two IRawAgreement implementations that pair with the modern asymmetric parameter classes covered by Batches 5/7/8/9/10: MLDsaSigner, SlhDsaSigner, Ed25519Signer, Ed25519ctxSigner, Ed25519phSigner, Ed448Signer, Ed448phSigner, X25519Agreement and X448Agreement. Adds class-level summaries citing the relevant FIPS / RFC and per-method <summary>, <param>, <returns>, and <exception> tags for the streaming Init / Update / GenerateSignature / VerifySignature / Reset surface (ISigner) and Init / CalculateAgreement surface (IRawAgreement). No behavioural 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 nine streaming primitives that pair with the modern asymmetric parameter classes covered by PRs #673 (Batch 5), #677 (Batch 7), #678 (Batch 8), #679 (Batch 9) and the open Batch 10 generators PR. With this batch the
ISigner/IRawAgreementsurface for ML-DSA, SLH-DSA, EdDSA and X-DH now carries the same depth of documentation as the parameters and key-pair generators.MLDsaSigner— class summary citing FIPS 204;Initdocuments theParametersWithContext(≤255 bytes) andParametersWithRandomenvelope unwrapping plus the parameter-set / key-set match check;GenerateSignature,VerifySignature,Resetdocumented with their full exception contracts.SlhDsaSigner— same shape as ML-DSA, citing FIPS 205; class summary explains the buffered context-prefixed message pattern.Ed25519Signer/Ed25519ctxSigner/Ed25519phSigner— class summaries citing RFC 8032 §5.1;Ed25519ctxSignerandEd25519phSignerconstructors document the cloned context parameter and theArgumentNullExceptionraised on a null context; the pure-Ed25519 signer explicitly notes that no context is permitted.Ed448Signer/Ed448phSigner— same shape as the Ed25519 ctx/ph signers, citing RFC 8032; class summaries note the SHAKE256 pre-hash for thephvariant.X25519Agreement/X448Agreement— class summaries citing RFC 7748;Initdocuments the cast contract;CalculateAgreementdocuments theInvalidOperationExceptionraised when the agreement produces an all-zero secret (degenerate peer key).Key Accomplishments
KeyGenerationParameters(Batch 9), key-pair generators (Batch 10) and now the signer / agreement primitives documented, every user-facing class in the ML-DSA / SLH-DSA / EdDSA / X-DH stack has consistent XML coverage.<exception>tags only added where the method body actually throws —InvalidCastExceptiononInitcasts,InvalidOperationExceptionon direction mismatches and pre-hash finalisation failures,ArgumentOutOfRangeExceptionwhen the context exceeds 255 bytes for the PQC signers,ArgumentExceptionon parameter-set mismatch.<param name="parameters">tags onMLDsaSignerandSlhDsaSignerconstructors that already documenteddeterministic.feature/modern-curves-docs(docs: add XML documentation for modern-curve parameters (Batch 7) #677),feature/slh-dsa-docs(docs: add XML documentation for SLH-DSA parameters (Batch 8) #678),feature/ml-pqc-gaps-docs(docs: add XML documentation for ML-KEM and ML-DSA parameter gaps (Batch 9) #679) andfeature/keypair-generators-docs(Batch 10).Verification
dotnet build crypto/src/BouncyCastle.Crypto.csproj -c Release— succeeded onnet6.0,netstandard2.0,net461with no new warnings. The two CS1573 warnings introduced by the first pass were resolved before push.Checklist before requesting a review
See also Contributing Guidelines.