tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

webcrypto-modern-algos.idl (3117B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Modern Algorithms in the Web Cryptography API (https://wicg.github.io/webcrypto-modern-algos/)
      5 
      6 [SecureContext,Exposed=(Window,Worker)]
      7 partial interface SubtleCrypto {
      8  Promise<EncapsulatedKey> encapsulateKey(
      9    AlgorithmIdentifier encapsulationAlgorithm,
     10    CryptoKey encapsulationKey,
     11    AlgorithmIdentifier sharedKeyAlgorithm,
     12    boolean extractable,
     13    sequence<KeyUsage> keyUsages
     14  );
     15  Promise<EncapsulatedBits> encapsulateBits(
     16    AlgorithmIdentifier encapsulationAlgorithm,
     17    CryptoKey encapsulationKey
     18  );
     19 
     20  Promise<CryptoKey> decapsulateKey(
     21    AlgorithmIdentifier decapsulationAlgorithm,
     22    CryptoKey decapsulationKey,
     23    BufferSource ciphertext,
     24    AlgorithmIdentifier sharedKeyAlgorithm,
     25    boolean extractable,
     26    sequence<KeyUsage> keyUsages
     27  );
     28  Promise<ArrayBuffer> decapsulateBits(
     29    AlgorithmIdentifier decapsulationAlgorithm,
     30    CryptoKey decapsulationKey,
     31    BufferSource ciphertext
     32  );
     33 
     34  Promise<CryptoKey> getPublicKey(
     35    CryptoKey key,
     36    sequence<KeyUsage> keyUsages
     37  );
     38 
     39  static boolean supports(DOMString operation,
     40                   AlgorithmIdentifier algorithm,
     41                   optional unsigned long? length = null);
     42  static boolean supports(DOMString operation,
     43                   AlgorithmIdentifier algorithm,
     44                   AlgorithmIdentifier additionalAlgorithm);
     45 };
     46 
     47 enum KeyFormat { "raw-public", "raw-private", "raw-seed", "raw-secret", "raw", "spki", "pkcs8", "jwk" };
     48 
     49 enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey", "encapsulateKey", "encapsulateBits", "decapsulateKey", "decapsulateBits" };
     50 
     51 dictionary EncapsulatedKey {
     52  CryptoKey sharedKey;
     53  ArrayBuffer ciphertext;
     54 };
     55 
     56 dictionary EncapsulatedBits {
     57  ArrayBuffer sharedKey;
     58  ArrayBuffer ciphertext;
     59 };
     60 
     61 partial dictionary JsonWebKey {
     62  // The following fields are defined in draft-ietf-cose-dilithium-08
     63  DOMString pub;
     64  DOMString priv;
     65 };
     66 
     67 dictionary ContextParams : Algorithm {
     68  BufferSource context;
     69 };
     70 
     71 dictionary AeadParams : Algorithm {
     72  required BufferSource iv;
     73  BufferSource additionalData;
     74  [EnforceRange] octet tagLength;
     75 };
     76 
     77 dictionary CShakeParams : Algorithm {
     78  required [EnforceRange] unsigned long length;
     79  BufferSource functionName;
     80  BufferSource customization;
     81 };
     82 
     83 dictionary KmacKeyGenParams : Algorithm {
     84  [EnforceRange] unsigned long length;
     85 };
     86 
     87 dictionary KmacImportParams : Algorithm {
     88  [EnforceRange] unsigned long length;
     89 };
     90 
     91 dictionary KmacKeyAlgorithm : KeyAlgorithm {
     92  required unsigned long length;
     93 };
     94 
     95 dictionary KmacParams : Algorithm {
     96  required [EnforceRange] unsigned long length;
     97  BufferSource customization;
     98 };
     99 
    100 dictionary Argon2Params : Algorithm {
    101  required BufferSource nonce;
    102  required [EnforceRange] unsigned long parallelism;
    103  required [EnforceRange] unsigned long memory;
    104  required [EnforceRange] unsigned long passes;
    105  [EnforceRange] octet version;
    106  BufferSource secretValue;
    107  BufferSource associatedData;
    108 };