1
0
镜像自地址 https://github.com/henrydcase/nobs.git 已同步 2024-11-26 00:51:22 +00:00

sike: move common (#33)

* makes common reusable
* exports some more symbols from common
* remove kem for a moment
这个提交包含在:
Henry Case 2020-05-16 20:14:48 +00:00 提交者 GitHub
父节点 55957bbf5e
当前提交 a152c09fd5
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 46 个文件被更改,包括 45 次插入58 次删除

查看文件

@ -10,7 +10,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -6,7 +6,7 @@
package p434
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.

查看文件

@ -8,7 +8,7 @@ package p434
import (
"math/bits"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Compute z = x + y (mod p).

查看文件

@ -6,7 +6,7 @@ package p434
import (
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Package-level storage for this field element is intended to deter

查看文件

@ -4,7 +4,7 @@
package p434
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// -----------------------------------------------------------------------------

查看文件

@ -4,7 +4,7 @@
package p434
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Stores isogeny 3 curve constants

查看文件

@ -7,7 +7,7 @@ import (
"bytes"
"testing"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
func vartimeEqProjFp2(lhs, rhs *ProjectivePoint) bool {

查看文件

@ -4,7 +4,7 @@
package p434
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Montgomery multiplication. Input values must be already

查看文件

@ -9,7 +9,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
type testParams struct {

查看文件

@ -3,7 +3,7 @@ package p434
//go:generate go run ../templates/gen.go P434
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -4,7 +4,7 @@ package p434
import (
"testing/quick"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Values omputed using Sage

查看文件

@ -10,7 +10,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -6,7 +6,7 @@
package p503
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.

查看文件

@ -8,7 +8,7 @@ package p503
import (
"math/bits"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Compute z = x + y (mod p).

查看文件

@ -6,7 +6,7 @@ package p503
import (
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Package-level storage for this field element is intended to deter

查看文件

@ -4,7 +4,7 @@
package p503
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// -----------------------------------------------------------------------------

查看文件

@ -4,7 +4,7 @@
package p503
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Stores isogeny 3 curve constants

查看文件

@ -7,7 +7,7 @@ import (
"bytes"
"testing"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
func vartimeEqProjFp2(lhs, rhs *ProjectivePoint) bool {

查看文件

@ -4,7 +4,7 @@
package p503
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Montgomery multiplication. Input values must be already

查看文件

@ -9,7 +9,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
type testParams struct {

查看文件

@ -3,7 +3,7 @@ package p503
//go:generate go run ../templates/gen.go P503
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -4,7 +4,7 @@ package p503
import (
"testing/quick"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Values omputed using Sage

查看文件

@ -10,7 +10,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -6,7 +6,7 @@
package p751
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.

查看文件

@ -8,7 +8,7 @@ package p751
import (
"math/bits"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Compute z = x + y (mod p).

查看文件

@ -6,7 +6,7 @@ package p751
import (
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Package-level storage for this field element is intended to deter

查看文件

@ -4,7 +4,7 @@
package p751
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// -----------------------------------------------------------------------------

查看文件

@ -4,7 +4,7 @@
package p751
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Stores isogeny 3 curve constants

查看文件

@ -7,7 +7,7 @@ import (
"bytes"
"testing"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
func vartimeEqProjFp2(lhs, rhs *ProjectivePoint) bool {

查看文件

@ -4,7 +4,7 @@
package p751
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Montgomery multiplication. Input values must be already

查看文件

@ -9,7 +9,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
type testParams struct {

查看文件

@ -3,7 +3,7 @@ package p751
//go:generate go run ../templates/gen.go P751
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"golang.org/x/sys/cpu"
)

查看文件

@ -4,7 +4,7 @@ package p751
import (
"testing/quick"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
var (

查看文件

@ -6,7 +6,7 @@
package {{ .PACKAGE}}
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// If choice = 0, leave x,y unchanged. If choice = 1, set x,y = y,x.

查看文件

@ -8,7 +8,7 @@ package {{ .PACKAGE}}
import (
"math/bits"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Compute z = x + y (mod p).

查看文件

@ -6,7 +6,7 @@ package {{ .PACKAGE}}
import (
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Package-level storage for this field element is intended to deter

查看文件

@ -4,7 +4,7 @@
package {{ .PACKAGE}}
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// -----------------------------------------------------------------------------

查看文件

@ -4,7 +4,7 @@
package {{ .PACKAGE}}
import (
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
// Stores isogeny 3 curve constants

查看文件

@ -7,7 +7,7 @@ import (
"bytes"
"testing"
. "github.com/henrydcase/nobs/dh/sidh/internal/common"
. "github.com/henrydcase/nobs/dh/sidh/common"
)
func vartimeEqProjFp2(lhs, rhs *ProjectivePoint) bool {

查看文件

@ -4,7 +4,7 @@
package {{ .PACKAGE}}
import (
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
// Montgomery multiplication. Input values must be already

查看文件

@ -9,7 +9,7 @@ import (
"testing"
"testing/quick"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
type testParams struct {

查看文件

@ -4,7 +4,7 @@ import (
"errors"
"io"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"github.com/henrydcase/nobs/dh/sidh/internal/p434"
"github.com/henrydcase/nobs/dh/sidh/internal/p503"
"github.com/henrydcase/nobs/dh/sidh/internal/p751"

查看文件

@ -8,7 +8,7 @@ import (
"math/big"
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
/* -------------------------------------------------------------------------

查看文件

@ -5,7 +5,7 @@ import (
"errors"
"io"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
"github.com/henrydcase/nobs/hash/sha3"
)

查看文件

@ -12,7 +12,7 @@ import (
"strings"
"testing"
"github.com/henrydcase/nobs/dh/sidh/internal/common"
"github.com/henrydcase/nobs/dh/sidh/common"
)
type sikeVec struct {

查看文件

@ -1,13 +0,0 @@
package mkem
func PK_enc() {
}
func PK_dec() {
}
func KEM_mEnc() {
}