Web Crypto: generateKey algorithm name capitalization

Issue #7444732 • Assigned to Steve B.

Details

Created
May 4, 2016
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

In the developer console, enter and run the following code:

window.crypto.subtle.generateKey({name: "aes-cbc", length: 128}, true, ["encrypt", “decrypt”]).then(function(key) {console.log(key.algorithm.name);});

aes-cbc will display. It should be AES-CBC. This is per Section 18.4.4. Normalizing an algorithm of the Web Cryptography API Candidate Recommendation:

“If registeredAlgorithms contains a key that is a case-insensitive string match for algName: 1. set algName to the value of the matching key.”

In this case, algName is what key.algorithm.name is set to. registeredAlgorithms is the list of standard algorithm names, which has AES-CBC, not aes-cbc.

This bug occurs for all algorithms used with generateKey. The algorithm.name is set to the value passed to the method, instead of the registered name.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Venkat K.”

      Changed Assigned To from “Venkat K.” to “Steve B.”

      Changed Title from “Web Cryptography API generateKey algorithm name capitalization” to “Web Crypto: generateKey algorithm name capitalization”

    You need to sign in to your Microsoft account to add a comment.

    Sign in