Project

General

Profile

Actions

Task #1648

closed

Add SecPublicInfo::getPublicKeyType?

Added by Anonymous over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Security
Target version:
Start date:
06/05/2014
Due date:
% Done:

100%

Estimated time:

Description

In SecPublicInfoSqlite3, the type of key is already saved along with the key DER. This allows it to distinguish an RSA key from another public key algorithm such as elliptic curve.

https://github.com/named-data/ndn-cxx/blob/c169a81a5caf3cb4dc14a0258719bc1ef09663cc/src/security/sec-public-info-sqlite3.cpp#L295

It seems that the SecPublicInfo API needs to have getPublicKeyType(keyName) so that KeyChain::sign can use the keyName do determine whether to create a SignatureSha256WithRsa or other type of signature.

https://github.com/named-data/ndn-cxx/blob/c169a81a5caf3cb4dc14a0258719bc1ef09663cc/src/security/key-chain.cpp#L188

Actions #1

Updated by Yingdi Yu over 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
Actions #2

Updated by Yingdi Yu over 10 years ago

  • Status changed from In Progress to Code review
  • Assignee set to Yingdi Yu
  • % Done changed from 50 to 100
Actions #3

Updated by Alex Afanasyev over 10 years ago

  • Category set to Security
  • Target version set to v0.2

Given the updated implementation of the PublicKey abstraction, this method is unnecessary and this issue should be rejected.

If I remember correctly, when one signs, it needs to get hold of (at least internally in keychain) of (Identity)Certificate, which encapsulates PublicKey. From PublicKey, the type can be retrieved directly, without requiring any new methods in SecPublicInfo.

Actions #4

Updated by Alex Afanasyev over 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF