From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6629F796F9 for ; Wed, 27 Oct 2021 09:06:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 548AAE493 for ; Wed, 27 Oct 2021 09:05:53 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id A3E84E489 for ; Wed, 27 Oct 2021 09:05:52 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6AAC245F43 for ; Wed, 27 Oct 2021 09:05:52 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Wed, 27 Oct 2021 09:05:51 +0200 Message-Id: <20211027070551.697454-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.270 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [encryption.rs] Subject: [pbs-devel] [PATCH proxmox-backup] fix typo s/CGM/GCM/i X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 07:06:23 -0000 only user visible change is in the error message Signed-off-by: Dominik Csapak --- pbs-config/src/key_config.rs | 2 +- pbs-tape/src/sg_tape/encryption.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pbs-config/src/key_config.rs b/pbs-config/src/key_config.rs index 178b3b52..9397633d 100644 --- a/pbs-config/src/key_config.rs +++ b/pbs-config/src/key_config.rs @@ -67,7 +67,7 @@ impl KeyDerivationConfig { /// Encryption Key Configuration /// /// We use this struct to store secret keys. When used with a key -/// derivation function, the key data is encrypted (AES-CGM), and you +/// derivation function, the key data is encrypted (AES-GCM), and you /// need the password to restore the plain key. #[derive(Deserialize, Serialize, Clone, Debug)] pub struct KeyConfig { diff --git a/pbs-tape/src/sg_tape/encryption.rs b/pbs-tape/src/sg_tape/encryption.rs index def1fbff..2fabd8eb 100644 --- a/pbs-tape/src/sg_tape/encryption.rs +++ b/pbs-tape/src/sg_tape/encryption.rs @@ -10,7 +10,7 @@ use crate::sgutils2::{SgRaw, alloc_page_aligned_buffer}; /// Test if drive supports hardware encryption /// -/// We search for AES_CGM algorithm with 256bits key. +/// We search for AES_GCM algorithm with 256bits key. pub fn has_encryption( file: &mut F, ) -> bool { @@ -213,14 +213,14 @@ struct SspDataEncryptionAlgorithmDescriptor { algorithm_code: u32, } -// Returns the algorythm_index for AES-CGM +// Returns the algorythm_index for AES-GCM fn decode_spin_data_encryption_caps(data: &[u8]) -> Result { proxmox_lang::try_block!({ let mut reader = &data[..]; let _page: SspDataEncryptionCapabilityPage = unsafe { reader.read_be_value()? }; - let mut aes_cgm_index = None; + let mut aes_gcm_index = None; loop { if reader.is_empty() { break; }; @@ -236,14 +236,14 @@ fn decode_spin_data_encryption_caps(data: &[u8]) -> Result { continue; // can't decrypt in hardware } if desc.algorithm_code == 0x00010014 && desc.key_size == 32 { - aes_cgm_index = Some(desc.algorythm_index); + aes_gcm_index = Some(desc.algorythm_index); break; } } - match aes_cgm_index { + match aes_gcm_index { Some(index) => Ok(index), - None => bail!("drive does not support AES-CGM encryption"), + None => bail!("drive does not support AES-GCM encryption"), } }).map_err(|err: Error| format_err!("decode data encryption caps page failed - {}", err)) -- 2.30.2