Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/crypto/internal/fips140/nistec/fiat/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ func BenchmarkMul(b *testing.B) {
v.Mul(v, v)
}
})
b.Run("P256", func(b *testing.B) {
v := new(fiat.P256Element).One()
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
v.Mul(v, v)
}
})
}

func BenchmarkSquare(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/internal/fips140/nistec/fiat/p256_fiat64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/crypto/internal/fips140/nistec/fiat/p256_impl.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2024 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.

//go:build !riscv64

package fiat

func p256Mul(out, a, b *p256MontgomeryDomainFieldElement) {
p256MulGeneric(out, a, b)
}
10 changes: 10 additions & 0 deletions src/crypto/internal/fips140/nistec/fiat/p256_impl_riscv64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2024 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.

//go:build !purego

package fiat

//go:noescape
func p256Mul(out, a, b *p256MontgomeryDomainFieldElement)
Loading