1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-24 08:02:33 +03:00

use new pake

This commit is contained in:
Zack Scholl 2021-04-16 09:20:13 -07:00
parent 628043b228
commit 2131e99826
3 changed files with 7 additions and 5 deletions

3
go.mod
View File

@ -2,6 +2,8 @@ module github.com/schollz/croc/v8
go 1.13
replace github.com/schollz/pake3 => ../pake3
require (
github.com/OneOfOne/xxhash v1.2.5 // indirect
github.com/cespare/xxhash v1.1.0
@ -14,6 +16,7 @@ require (
github.com/schollz/logger v1.2.0
github.com/schollz/mnemonicode v1.0.1
github.com/schollz/pake/v2 v2.0.7
github.com/schollz/pake3 v0.0.0-00010101000000-000000000000 // indirect
github.com/schollz/peerdiscovery v1.6.3
github.com/schollz/progressbar/v3 v3.7.6
github.com/spaolacci/murmur3 v1.1.0 // indirect

View File

@ -20,10 +20,9 @@ import (
"github.com/denisbrodbeck/machineid"
log "github.com/schollz/logger"
"github.com/schollz/pake/v2"
pake "github.com/schollz/pake3"
"github.com/schollz/peerdiscovery"
"github.com/schollz/progressbar/v3"
"github.com/tscholl2/siec"
"github.com/schollz/croc/v8/src/comm"
"github.com/schollz/croc/v8/src/compress"
@ -166,9 +165,9 @@ func New(ops Options) (c *Client, err error) {
// initialize pake
if c.Options.IsSender {
c.Pake, err = pake.Init([]byte(c.Options.SharedSecret[5:]), 1, siec.SIEC255(), 1*time.Microsecond)
c.Pake, err = pake.InitCurve([]byte(c.Options.SharedSecret[5:]), 1, "siec", 1*time.Microsecond)
} else {
c.Pake, err = pake.Init([]byte(c.Options.SharedSecret[5:]), 0, siec.SIEC255(), 1*time.Microsecond)
c.Pake, err = pake.InitCurve([]byte(c.Options.SharedSecret[5:]), 0, "siec", 1*time.Microsecond)
}
if err != nil {
return

View File

@ -9,7 +9,7 @@ import (
"time"
log "github.com/schollz/logger"
"github.com/schollz/pake/v2"
pake "github.com/schollz/pake3"
"github.com/schollz/croc/v8/src/comm"
"github.com/schollz/croc/v8/src/crypt"