pub struct ExporterBinding;Implementations§
Source§impl ExporterBinding
impl ExporterBinding
Sourcepub fn derive(
transport_secret: &[u8],
label: &str,
context: &[u8],
length: usize,
) -> Vec<u8> ⓘ
pub fn derive( transport_secret: &[u8], label: &str, context: &[u8], length: usize, ) -> Vec<u8> ⓘ
Mirrors TlsBridge.deriveExporterKey in TS:
salt = utf8(“tf-tls-exporter:” + label)
ikm = transport_secret || context
prk1 = HMAC-SHA256(salt, ikm)
okm = HKDF(sha256, prk1, salt=undefined, info=salt, length)
= HKDF-Expand(HMAC-SHA256(zeros[32], prk1), info=salt, length)
This is not RFC 5705 by itself — the transport_secret is the
output of RFC 5705 §4 exporter on the underlying TLS / QUIC
session, and we layer another HKDF on top so the TrustForge
session PSK is domain-separated from anything the application
may already derive from the same exporter.
Auto Trait Implementations§
impl Freeze for ExporterBinding
impl RefUnwindSafe for ExporterBinding
impl Send for ExporterBinding
impl Sync for ExporterBinding
impl Unpin for ExporterBinding
impl UnsafeUnpin for ExporterBinding
impl UnwindSafe for ExporterBinding
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more