pub struct ExperimentalConfiguration<L>(/* private fields */);
Expand description

An experimental configuration

Trait Implementations§

source§

impl<L> Clone for ExperimentalConfiguration<L>
where L: Clone,

source§

fn clone(&self) -> ExperimentalConfiguration<L>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<L> Configuration for ExperimentalConfiguration<L>
where L: DomainLabel,

source§

fn get_commitment_nonce( commitment_key: &[u8], label: &NodeLabel, _version: u64, _value: &AkdValue ) -> [u8; 32]

Used by the server to produce a commitment nonce for an AkdLabel, version, and AkdValue. Computes nonce = H(commitment key || label)

source§

fn compute_fresh_azks_value( commitment_key: &[u8], label: &NodeLabel, version: u64, value: &AkdValue ) -> AzksValue

Used by the server to produce a commitment for an AkdLabel, version, and AkdValue

nonce = H(commitment key || label) commmitment = H(i2osp_array(value), i2osp_array(nonce))

The nonce value is used to create a hiding and binding commitment using a cryptographic hash function. Note that it is derived from the label, version, and value (even though the binding to value is somewhat optional).

Note that this commitment needs to be a hash function (random oracle) output

source§

fn get_hash_from_label_input( label: &AkdLabel, freshness: VersionFreshness, version: u64 ) -> Vec<u8>

To convert a regular label (arbitrary string of bytes) into a NodeLabel, we compute the output as: H(label || freshness || version)

Specifically, we concatenate the following together:

  • I2OSP(len(label) as u64, label)
  • A single byte encoded as 0u8 if “stale”, 1u8 if “fresh”
  • A u64 representing the version These are all interpreted as a single byte array and hashed together, with the output of the hash returned.
source§

fn compute_parent_hash_from_children( left_val: &AzksValue, left_label: &[u8], right_val: &AzksValue, right_label: &[u8] ) -> AzksValue

Computes the parent hash from the children hashes and labels

source§

fn compute_root_hash_from_val(root_val: &AzksValue) -> [u8; 32]

Given the top-level hash, compute the “actual” root hash that is published by the directory maintainer

source§

fn stale_azks_value() -> AzksValue

Similar to commit_fresh_value, but used for stale values.

source§

fn hash(item: &[u8]) -> [u8; 32]

Hash a single byte array
source§

fn empty_root_value() -> AzksValue

The value stored in the root node upon initialization, with no children
source§

fn empty_node_hash() -> AzksValue

AZKS value corresponding to an empty node
source§

fn hash_leaf_with_value( value: &AkdValue, epoch: u64, nonce: &[u8] ) -> AzksValueWithEpoch

Hash a leaf epoch and nonce with a given AkdValue
source§

fn hash_leaf_with_commitment( commitment: AzksValue, epoch: u64 ) -> AzksValueWithEpoch

Hash a commit and epoch together to get the leaf’s hash value
source§

fn compute_node_label_value(bytes: &[u8]) -> Vec<u8>

Computes the node label value from the bytes of the label
source§

fn empty_label() -> NodeLabel

Returns the representation of the empty label
source§

impl<L> Send for ExperimentalConfiguration<L>

source§

impl<L> Sync for ExperimentalConfiguration<L>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.