Search code examples
node.jscryptojs

Difference Between id-aes128-wrap vs aes128-wrap?


In Node.js, console.dir(getCiphers(), {'maxArrayLength': null}) outputs both id-aes128-wrap and aes128-wrap. What's the difference between them?

Running getCipherInfo seems to indicate that the latter is just an alias for the former?

console.log(getCipherInfo('id-aes128-wrap'))
console.log(getCipherInfo('aes128-wrap'))

Returns:

{
  mode: 'wrap',
  name: 'id-aes128-wrap',
  nid: 788,
  blockSize: 8,
  ivLength: 8,
  keyLength: 16
}
{
  mode: 'wrap',
  name: 'id-aes128-wrap',
  nid: 788,
  blockSize: 8,
  ivLength: 8,
  keyLength: 16
}

Solution

  • They're the same thing; it's an alias.