mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
add siec as default
This commit is contained in:
parent
f6abf9c4e8
commit
ae7ceca3b7
1 changed files with 5 additions and 4 deletions
|
@ -11,7 +11,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/schollz/croc/src/pake"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/tscholl2/siec"
|
||||||
)
|
)
|
||||||
|
|
||||||
// catFiles copies data from n files to a single one and removes source files
|
// catFiles copies data from n files to a single one and removes source files
|
||||||
|
@ -71,7 +74,7 @@ func splitFile(fileName string, numPieces int) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCurve(s string) (curve elliptic.Curve) {
|
func getCurve(s string) (curve pake.EllipticCurve) {
|
||||||
switch s {
|
switch s {
|
||||||
case "p224":
|
case "p224":
|
||||||
curve = elliptic.P224()
|
curve = elliptic.P224()
|
||||||
|
@ -82,9 +85,7 @@ func getCurve(s string) (curve elliptic.Curve) {
|
||||||
case "p521":
|
case "p521":
|
||||||
curve = elliptic.P521()
|
curve = elliptic.P521()
|
||||||
default:
|
default:
|
||||||
// TODO:
|
curve = siec.SIEC255()
|
||||||
// add SIEC
|
|
||||||
curve = elliptic.P256()
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue