Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: services/vanadium/security/public_key.go

Issue 1418013004: Principal Service: Add support for multiple user accounts (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/vanadium/security/principal_service.go ('k') | services/vanadium/security/wire_blessings.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/vanadium/security/public_key.go
diff --git a/services/vanadium/security/public_key.go b/services/vanadium/security/public_key.go
index 3301c226846cff94900efb9a4e2436c5041c0ad0..27078c7a3d8c80ab02daa9eadb700a58baeebb23 100644
--- a/services/vanadium/security/public_key.go
+++ b/services/vanadium/security/public_key.go
@@ -6,9 +6,7 @@ package main
import (
"crypto/ecdsa"
- "crypto/elliptic"
"crypto/md5"
- "crypto/rand"
"crypto/x509"
"encoding"
"errors"
@@ -25,15 +23,6 @@ const (
sha512Hash = hash("SHA512") // sha512 cryptographic hash function defined in FIPS 180-2.
)
-// newPrincipalKey generates an ECDSA (public, private) key pair.
-func newPrincipalKey() (publicKey, *ecdsa.PrivateKey, error) {
- priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
- if err != nil {
- return nil, nil, err
- }
- return newECDSAPublicKey(&priv.PublicKey), priv, nil
-}
-
// publicKey represents a public key using an unspecified algorithm.
//
// MarshalBinary returns the DER-encoded PKIX representation of the public key,
« no previous file with comments | « services/vanadium/security/principal_service.go ('k') | services/vanadium/security/wire_blessings.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698