Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

signing: access private key only once #330

Merged
merged 1 commit into from Aug 5, 2020

Conversation

siriobalmelli
Copy link
Contributor

@siriobalmelli siriobalmelli commented Jul 9, 2020

Pass a Signing() object 'signer' to Package() and Package.sign_firmware(),
instead of a 'key_file' string (path).

Access the private key only once, when generating 'signer', which:

  1. Fixes a security issue where caller must write private key to disk
    instead of passing it purely in memory eg:

    nrfutil --key-file $(secure-key-retrieval)

  2. Gives a small speed improvement.

Fixes #327

Signed-off-by: Sirio Balmelli sirio@b-ad.ch

Pass a Signing() object 'signer' to Package() and Package.sign_firmware(),
instead of a 'key_file' string (path).

Access the private key only once, when generating 'signer', which:

1. Fixes a security issue where caller must write private key to disk
instead of passing it purely in memory eg:

    nrfutil --key-file $(secure-key-retrieval)

2. Gives a small speed improvement.

Fixes NordicSemiconductor#327

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
@siriobalmelli
Copy link
Contributor Author

Bump; any comments on this one?

@bencefr
Copy link
Contributor

bencefr commented Jul 28, 2020

Hi @siriobalmelli ,
Thank you for your contribution! It is appreciated and certainly will be reviewed.
Please be patient, during vacation period we have reduced workforce to deal with our backlog.

@bihanssen
Copy link
Contributor

@siriobalmelli, thanks for the contrib. The change looks good and works fine as far as I can tell.

@bihanssen bihanssen merged commit a540fe4 into NordicSemiconductor:master Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

security: multiple access to .pem file passed to --key-file option
3 participants