Skip to content
Advertisement

How to translate an OID to a JCE algorithm name? [closed]

I am looking for a library that can take a oid such as 1.2.840.10040.4.3 and translate it to its standard name (in this case SHA1withDSA)

Using org.cesecore.certificates.util.AlgorithmTools, I am able to achieve some of the required functionality, but it is very limited.

This is the current code:

JavaScript

Note:

The standard names can be found here

Advertisement

Answer

There is an online database of OID’s at oid-info.com that you can use.

As you can see the OID database is huge. Besides that, due to companies defining their own OID’s under their base OID, many OID’s are actually unknown.

The AlgorithmTools class has simply defined a list of OID’s for signature algorithms, it doesn’t attempt to dynamically find out which algorithms are available by using an OID as alias.

Note that some OID’s are used for multiple classes. For instance, you can have an RSA Cipher, KeyFactory and KeyPairGenerator.

You can however find out which OID’s are available for the currently installed providers:

JavaScript

Example output:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement