theupdateframework / theupdateframework/specification

What is the PEM encoding for RSA public keys?

Open
#48 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
405
Forks
59
Avg merge
3d 4h
Merged PRs (30d)
1

Description

In section 4.2, the spec states that RSA public keys are stored in PEM format, but may be vague. RSA PEM keys support two forms of encoding, RSAPublicKey form, as in:

-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA4XLc9x7DX00eSQ4WvlqyojG1D/hr+X5Sn7dtd0Lq2MUarOqCRNDC
liKVni4ljwOADTn/+/JOgyS7Qf9RSi3KhKFMqEO83vKrbxJQHI4jK9kXlDtTPWmb
fdPzAMkc3tMNmp7M1DrYRUKR1++z5rb1AKCLIylhMp6j4oxOhKAc5ySKppMdr0EU
5Yih2kcqF/BmcIc6h/XNXS+iLOnOq9uT0+1VBhQ1iK542AM6XpXg3VADgq9PUzRf
ZfU4hVgbL6nTLH9j/lTyRn6Rl/rWgKSHo2xoAXrRTNJ5IEjfrSpsWrI4c9nSHs07
JosZDpmwJlC0GDET0ps18m1X8BTfj55UxQIDAQAB
-----END RSA PUBLIC KEY-----

And the newer SubjectPublicKeyInfo form, as in:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4XLc9x7DX00eSQ4Wvlqy
ojG1D/hr+X5Sn7dtd0Lq2MUarOqCRNDCliKVni4ljwOADTn/+/JOgyS7Qf9RSi3K
hKFMqEO83vKrbxJQHI4jK9kXlDtTPWmbfdPzAMkc3tMNmp7M1DrYRUKR1++z5rb1
AKCLIylhMp6j4oxOhKAc5ySKppMdr0EU5Yih2kcqF/BmcIc6h/XNXS+iLOnOq9uT
0+1VBhQ1iK542AM6XpXg3VADgq9PUzRfZfU4hVgbL6nTLH9j/lTyRn6Rl/rWgKSH
o2xoAXrRTNJ5IEjfrSpsWrI4c9nSHs07JosZDpmwJlC0GDET0ps18m1X8BTfj55U
xQIDAQAB
-----END PUBLIC KEY-----

Should we support both forms of key encoding, or just one? Presumably we need to at least support SubjectPublicKeyInfo for ECDSA keys.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with section 4.2 and compare its wording against the two RSA PEM forms and the SubjectPublicKeyInfo form shown in the issue. Determine which encodings the specification must support, including the form needed for ECDSA, then update the section so the supported encoding is unambiguous; no files or tests are named.

Written by the indexing model from the issue text.

Assessment

Tech stack
cryptography
Domain
cryptography, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.