-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on supporting WebAuthN public key in eos-go
Added support for public WebAuthN key as well as signature handling. For now, verification of signature against message is left for another time, but it seems it should be possible.
- Loading branch information
Matthieu Vachon
committed
Jan 22, 2020
1 parent
76efcfb
commit 4985cf2
Showing
22 changed files
with
397 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package ecc | ||
|
||
import ( | ||
"bytes" | ||
"fmt" | ||
) | ||
|
||
type innerWAPrivateKey struct { | ||
} | ||
|
||
func (k *innerWAPrivateKey) publicKey() PublicKey { | ||
//TODO: Finish WA support here - for now we return bogus key | ||
var pubKeyData []byte | ||
pubKeyData = append(pubKeyData, byte(1)) | ||
pubKeyData = append(pubKeyData, bytes.Repeat([]byte{0}, 33)...) | ||
return PublicKey{Curve: CurveWA, Content: pubKeyData, inner: &innerWAPublicKey{}} | ||
} | ||
|
||
func (k *innerWAPrivateKey) sign(hash []byte) (out Signature, err error) { | ||
return out, fmt.Errorf("WA not supported") | ||
} | ||
|
||
func (k *innerWAPrivateKey) string() string { | ||
return "PVT_WA_PLACE_HOLDER" | ||
} |
Oops, something went wrong.