add siec as default

This commit is contained in:
Zack Scholl 2018-06-30 16:33:51 -07:00
parent f6abf9c4e8
commit ae7ceca3b7
1 changed files with 5 additions and 4 deletions

View File

@ -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
} }