Merge branch 'hs_descencnonce' into 'main'
Rename DescEncNonce => HsDescEncNonce See merge request tpo/core/arti!1014
This commit is contained in:
commit
34dcb6004e
|
@ -29,7 +29,7 @@ pub(super) struct HsDescEncryption<'a> {
|
||||||
/// For the encryption layer, it is `descriptor_cookie` (2.5.2.1)
|
/// For the encryption layer, it is `descriptor_cookie` (2.5.2.1)
|
||||||
/// which is present when descriptor-encryption authentication via
|
/// which is present when descriptor-encryption authentication via
|
||||||
/// `KP_hsc_desc_enc` is in use.
|
/// `KP_hsc_desc_enc` is in use.
|
||||||
pub(super) desc_enc_nonce: Option<&'a DescEncNonce>,
|
pub(super) desc_enc_nonce: Option<&'a HsDescEncNonce>,
|
||||||
/// The "subcredential" of the onion service.
|
/// The "subcredential" of the onion service.
|
||||||
pub(super) subcredential: &'a Subcredential,
|
pub(super) subcredential: &'a Subcredential,
|
||||||
/// The current revision of the onion service descriptor being decrypted.
|
/// The current revision of the onion service descriptor being decrypted.
|
||||||
|
@ -47,7 +47,7 @@ pub(super) struct HsDescEncryption<'a> {
|
||||||
/// This is `N_hs_desc_enc` in the spec, where sometimes we also call it a
|
/// This is `N_hs_desc_enc` in the spec, where sometimes we also call it a
|
||||||
/// "descriptor cookie".
|
/// "descriptor cookie".
|
||||||
#[derive(derive_more::AsRef, derive_more::From)]
|
#[derive(derive_more::AsRef, derive_more::From)]
|
||||||
pub(super) struct DescEncNonce([u8; 16]);
|
pub(super) struct HsDescEncNonce([u8; 16]);
|
||||||
|
|
||||||
/// Length of our cryptographic salt.
|
/// Length of our cryptographic salt.
|
||||||
const SALT_LEN: usize = 16;
|
const SALT_LEN: usize = 16;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use crate::parse::{keyword::Keyword, parser::SectionRules};
|
||||||
use crate::types::misc::B64;
|
use crate::types::misc::B64;
|
||||||
use crate::{Pos, Result};
|
use crate::{Pos, Result};
|
||||||
|
|
||||||
use super::desc_enc::{DescEncNonce, HsDescEncryption};
|
use super::desc_enc::{HsDescEncNonce, HsDescEncryption};
|
||||||
use super::DecryptionError;
|
use super::DecryptionError;
|
||||||
|
|
||||||
/// A more-or-less verbatim representation of the middle document of an onion
|
/// A more-or-less verbatim representation of the middle document of an onion
|
||||||
|
@ -78,7 +78,7 @@ impl HsDescMiddle {
|
||||||
&self,
|
&self,
|
||||||
subcredential: &Subcredential,
|
subcredential: &Subcredential,
|
||||||
ks_hsc_desc_enc: &HsClientDescEncSecretKey,
|
ks_hsc_desc_enc: &HsClientDescEncSecretKey,
|
||||||
) -> Option<DescEncNonce> {
|
) -> Option<HsDescEncNonce> {
|
||||||
use cipher::{KeyIvInit, StreamCipher};
|
use cipher::{KeyIvInit, StreamCipher};
|
||||||
use digest::{ExtendableOutput, Update};
|
use digest::{ExtendableOutput, Update};
|
||||||
use tor_llcrypto::cipher::aes::Aes256Ctr as Cipher;
|
use tor_llcrypto::cipher::aes::Aes256Ctr as Cipher;
|
||||||
|
|
Loading…
Reference in New Issue