Options
All
  • Public
  • Public/Protected
  • All
Menu

A check code that can be used to confirm that two [EstablishedEcies] objects share the same secret. This is supposed to be shared out-of-band to protect against active Man-in-the-middle (MITM) attacks.

Since the initiator device can always tell whether a MITM attack is in progress after channel establishment, this code technically carries only a single bit of information, representing whether the initiator has determined that the channel is "secure" or "not secure".

However, given this will need to be interactively confirmed by the user, there is risk that the user would confirm the dialogue without paying attention to its content. By expanding this single bit into a deterministic two-digit check code, the user is forced to pay more attention by having to enter it instead of just clicking through a dialogue.

Hierarchy

  • CheckCode

Index

Constructors

Methods

  • as_bytes(): Uint8Array
  • Convert the check code to an array of two bytes.

    The bytes can be converted to a more user-friendly representation. The [CheckCode::to_digit] converts the bytes to a two-digit number.

    Returns Uint8Array

  • free(): void
  • Returns void

  • to_digit(): number
  • Convert the check code to two base-10 numbers.

    The number should be displayed with a leading 0 in case the first digit is a 0.

    Returns number

Generated using TypeDoc