From a88620a96d0e8a0dd0274b24005f2885859b1ddf Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 4 Nov 2021 18:05:33 +0100 Subject: [PATCH] Add some more documentation to CardApp::signature_for_hash. --- openpgp-card/src/card_app.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openpgp-card/src/card_app.rs b/openpgp-card/src/card_app.rs index 850aa6c..bea83b7 100644 --- a/openpgp-card/src/card_app.rs +++ b/openpgp-card/src/card_app.rs @@ -463,9 +463,15 @@ impl CardApp { /// Sign `hash`, on the card. /// - /// (This is a wrapper around the low-level + /// This is a wrapper around the low-level /// pso_compute_digital_signature operation. - /// It builds the required `data` field from `hash`) + /// It builds the required `data` field from `hash`. + /// + /// For RSA, this means a "DigestInfo" data structure is generated. + /// (see 7.2.10.2 DigestInfo for RSA). + /// + /// With ECC the hash data is processed as is, using + /// pso_compute_digital_signature. pub fn signature_for_hash( &mut self, hash: Hash,