11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_cimodule.exports = function() {
41cb0ef41Sopenharmony_ci  const pkcs8 = {
51cb0ef41Sopenharmony_ci    'Ed25519': Buffer.from(
61cb0ef41Sopenharmony_ci      '302e020100300506032b657004220420f3c8f4c48df878146e8cd3bf6df4e50e389b' +
71cb0ef41Sopenharmony_ci      'a7074e15c2352dcd5d308d4ca81f', 'hex'),
81cb0ef41Sopenharmony_ci    'Ed448': Buffer.from(
91cb0ef41Sopenharmony_ci      '3047020100300506032b6571043b04390eff03458c28e0179c521de312c969b78343' +
101cb0ef41Sopenharmony_ci      '48ecab991a60e3b2e9a79e4cd9e480ef291712d2c83d047272d5c9f428664f696d26' +
111cb0ef41Sopenharmony_ci      '70458f1d2e', 'hex')
121cb0ef41Sopenharmony_ci  }
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci  const spki = {
151cb0ef41Sopenharmony_ci    'Ed25519': Buffer.from(
161cb0ef41Sopenharmony_ci      '302a300506032b6570032100d8e18963d809d487d9549accaec6742e7eeba24d8a0d' +
171cb0ef41Sopenharmony_ci      '3b14b7e3caea06893dcc', 'hex'),
181cb0ef41Sopenharmony_ci    'Ed448': Buffer.from(
191cb0ef41Sopenharmony_ci      '3043300506032b6571033a00ab4bb885fd7d2c5af24e83710cffa0c74a57e274801d' +
201cb0ef41Sopenharmony_ci      'b2057b0bdc5ea032b6fe6bc78b8045365aeb26e86e1f14fd349d07c48495f5a46a5a' +
211cb0ef41Sopenharmony_ci      '80', 'hex')
221cb0ef41Sopenharmony_ci  }
231cb0ef41Sopenharmony_ci
241cb0ef41Sopenharmony_ci  const data = Buffer.from(
251cb0ef41Sopenharmony_ci    '2b7ed0bc7795694ab4acd35903fe8cd7d80f6a1c8688a6c3414409457514a1457855bb' +
261cb0ef41Sopenharmony_ci    'b219e30a1beea8fe869082d99fc8282f9050d024e59eaf0730ba9db70a', 'hex');
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci  // For verification tests.
291cb0ef41Sopenharmony_ci  const signatures = {
301cb0ef41Sopenharmony_ci    'Ed25519': Buffer.from(
311cb0ef41Sopenharmony_ci      '3d90de5e5743dfc28225bfadb341b116cbf8a3f1ceedbf4adc350ef5d3471843a418' +
321cb0ef41Sopenharmony_ci      '614dcb6e614862614cf7af1496f9340b3c844ea4dceab1d3d155eb7ecc00', 'hex'),
331cb0ef41Sopenharmony_ci    'Ed448': Buffer.from(
341cb0ef41Sopenharmony_ci      '76897e8c50ac6b1132735c09c55f506c0149d2677c75664f8bc10b826fbd9df0a03c' +
351cb0ef41Sopenharmony_ci      'd986bce8339e64c7d1720ea9361784dc73837765ac2980c0dac0814a8bc187d1c9c9' +
361cb0ef41Sopenharmony_ci      '07c5dcc07956f85b70930fe42de764177217cb2d52bab7c1debe0ca89ccecbcd63f7' +
371cb0ef41Sopenharmony_ci      '025a2a5a572b9d23b0642f00', 'hex')
381cb0ef41Sopenharmony_ci  }
391cb0ef41Sopenharmony_ci
401cb0ef41Sopenharmony_ci  const algorithms = ['Ed25519', 'Ed448'];
411cb0ef41Sopenharmony_ci
421cb0ef41Sopenharmony_ci  const vectors = algorithms.map((algorithm) => ({
431cb0ef41Sopenharmony_ci    publicKeyBuffer: spki[algorithm],
441cb0ef41Sopenharmony_ci    privateKeyBuffer: pkcs8[algorithm],
451cb0ef41Sopenharmony_ci    name: algorithm,
461cb0ef41Sopenharmony_ci    data,
471cb0ef41Sopenharmony_ci    signature: signatures[algorithm],
481cb0ef41Sopenharmony_ci  }));
491cb0ef41Sopenharmony_ci
501cb0ef41Sopenharmony_ci  return vectors;
511cb0ef41Sopenharmony_ci}
52