Source file src/crypto/internal/fips140test/nistec_ordinv_fips140v1.0_test.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build fips140v1.0 || fips140v1.26 6 7 package fipstest 8 9 import ( 10 "crypto/internal/fips140/nistec" 11 "internal/goarch" 12 "testing" 13 ) 14 15 // package nistec 16 // func P256OrdInverse(k []byte) ([]byte, error) 17 18 func p256OrdInverse(t *testing.T, k *[4]uint64) { 19 input := limbsToBytes(*k) 20 out, err := nistec.P256OrdInverse(input) 21 if err != nil { 22 switch goarch.GOARCH { 23 case "amd64", "arm64": 24 t.Fatal(err) 25 default: 26 t.Skip("this GOARCH didn't have P256OrdInverse in v1.0/v1.26") 27 } 28 } 29 *k = bytesToLimbs(out) 30 } 31