1
0
зеркало из https://github.com/henrydcase/nobs.git synced 2024-11-24 16:11:20 +00:00

Сравнить коммиты

...

3 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot]
25b66236df
Bump golang.org/x/sys in /kem/mkem (#50)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20191120155948-bd437916bb0e to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13 23:15:16 +00:00
dependabot[bot]
a7142b7412
Bump golang.org/x/sys from 0.0.0-20191120155948-bd437916bb0e to 0.1.0 (#49)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20191120155948-bd437916bb0e to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-13 23:13:08 +00:00
Jacob Appelbaum
20fffc2f35
add basic support for ppc64le, riscv64 (#48)
This change set modifies build metadata to add support for ppc64le
(POWER9) and riscv64 (RISC-V).  The arm64 and amd64 assembler
implementations are architecture specific and do not support ppc64le or
riscv64. On ppc64le or riscv64 a generic implementation is chosen.  The
drbg/internal/aes/cipher_noasm.go file was written by @mixmasala and
myself.

The csidh and sidh tests are extremely slow (>30m) on RISC-V using the
sifive,u54-mc (HiFive Unleashed) development board. The test timeout is
set to infinity on RISC-V by the top level Makefile as at least one test
does not finish within the default 10 minutes on RISC-V. On RISC-V the
csidh test finishes after around 30 minutes, the sidh test finishes
after around 71 minutes.

These changes were tested with amd64 (Intel Core i7), arm64 (Raspberry
Pi 4b), ppc64le (Talos POWER9, PowerNV T2P9D01 REV 1.00), and riscv64
(HighFive Unleashed, rv64imafdc,sifive,u54-mc).

The kernel versions of those systems follows:

Linux rpi4 5.13.0-1009-raspi #10-Ubuntu SMP PREEMPT Mon Oct 25 13:58:43
UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Linux i7 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021
x86_64 x86_64 x86_64 GNU/Linux

Linux power9 5.11.0-34-generic #36-Ubuntu SMP Thu Aug 26 19:19:54 UTC
2021 ppc64le ppc64le ppc64le GNU/Linux

Linux risc-v-unleashed-000 5.11.0-1022-generic #23~20.04.1-Ubuntu SMP
Thu Oct 21 10:16:27 UTC 2021 riscv64 riscv64 riscv64 GNU/Linux
2023-03-13 23:12:45 +00:00
9 изменённых файлов: 48 добавлений и 4 удалений

Просмотреть файл

@ -11,6 +11,17 @@ BENCH_OPTS ?= -v -bench=. -run="^_" -benchmem
TEST_PATH ?= ./...
DBG = 1
OPTS_ENV =
OPTS_TAGS ?= -tags noasm
ARCH = $(shell uname -m)
ifeq ($(ARCH), ppc64le)
NOASM+=1
endif
ifeq ($(ARCH), riscv64)
NOASM+=1
OPTS_TAGS+= -timeout 0
endif
ifeq ($(NOASM),1)
OPTS+=$(OPTS_TAGS)

Просмотреть файл

@ -1,3 +1,5 @@
// +build noasm amd64 arm64 ppc64le riscv64
package csidh
import (

Просмотреть файл

@ -1,6 +1,8 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build noasm amd64 arm64 ppc64le riscv64
package aes

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build noasm amd64 arm64 ppc64le riscv64
package aes

27
drbg/internal/aes/cipher_noasm.go Обычный файл
Просмотреть файл

@ -0,0 +1,27 @@
// +build noasm ppc64le riscv64
package aes
import(
"errors"
)
type AESAsm struct {
}
func (a *AESAsm) SetKey(key []byte) error {
panic("NotImplemented")
return errors.New("ErrNotImplemented")
}
func (a *AESAsm) Encrypt(dst, src []byte) {
panic("NotImplemented")
}
func (a *AESAsm) Decrypt(dst, src []byte) {
panic("NotImplemented")
}
func expandKey(key []byte, enc, dec []uint32) {
expandKeyGo(key, enc, dec)
}

Просмотреть файл

@ -1,6 +1,7 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build noasm amd64 arm64 ppc64le riscv64
// This Go implementation is derived in part from the reference
// ANSI C implementation, which carries the following notice:

2
go.mod
Просмотреть файл

@ -2,4 +2,4 @@ module github.com/henrydcase/nobs
go 1.12
require golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e
require golang.org/x/sys v0.1.0

4
go.sum
Просмотреть файл

@ -1,2 +1,2 @@
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

Просмотреть файл

@ -5,5 +5,5 @@ go 1.12
require (
github.com/dterei/gotsc v0.0.0-20160722215413-e78f872945c6
github.com/henrydcase/nobs v0.0.0-20200516223741-2500d74484f2
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e
golang.org/x/sys v0.1.0 // indirect
)