Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for Qinv (0.1 sec)

  1. src/crypto/internal/boring/rsa.go

    		return bad(fail("RSA_generate_key_fips"))
    	}
    
    	var n, e, d, p, q, dp, dq, qinv *C.GO_BIGNUM
    	C._goboringcrypto_RSA_get0_key(key, &n, &e, &d)
    	C._goboringcrypto_RSA_get0_factors(key, &p, &q)
    	C._goboringcrypto_RSA_get0_crt_params(key, &dp, &dq, &qinv)
    	return bnToBig(n), bnToBig(e), bnToBig(d), bnToBig(p), bnToBig(q), bnToBig(dp), bnToBig(dq), bnToBig(qinv), nil
    }
    
    type PublicKeyRSA struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 23:38:03 UTC 2024
    - 12K bytes
    - Viewed (0)
  2. src/crypto/rsa/rsa.go

    			PublicKey: PublicKey{
    				N: N,
    				E: int(e64),
    			},
    			D:      D,
    			Primes: []*big.Int{P, Q},
    			Precomputed: PrecomputedValues{
    				Dp:        Dp,
    				Dq:        Dq,
    				Qinv:      Qinv,
    				CRTValues: make([]CRTValue, 0), // non-nil, to match Precompute
    				n:         mn,
    				p:         mp,
    				q:         mq,
    			},
    		}
    		return key, nil
    	}
    
    	priv := new(PrivateKey)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  3. src/crypto/rsa/pss_test.go

    		case newKeyMarker:
    			key = new(PublicKey)
    			nHex, ok := <-values
    			if !ok {
    				continue
    			}
    			key.N = bigFromHex(nHex)
    			key.E = intFromHex(<-values)
    			// We don't care for d, p, q, dP, dQ or qInv.
    			for i := 0; i < 6; i++ {
    				<-values
    			}
    		case newSignatureMarker:
    			msg := fromHex(<-values)
    			<-values // skip salt
    			sig := fromHex(<-values)
    
    			h.Reset()
    			h.Write(msg)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  4. src/crypto/internal/nistec/p256_asm_table_test.go

    	p := NewP256Point()
    	zInv := new(p256Element)
    	zInvSq := new(p256Element)
    
    	for j := 0; j < 32; j++ {
    		p.Add(p, base)
    
    		// Convert p to affine coordinates.
    		p256Inverse(zInv, &p.z)
    		p256Sqr(zInvSq, zInv, 1)
    		p256Mul(zInv, zInv, zInvSq)
    
    		p256Mul(&p.x, &p.x, zInvSq)
    		p256Mul(&p.y, &p.y, zInv)
    		p.z = p256One
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  5. src/internal/trace/mud_test.go

    		for j := 0.0; j < mass; j += mass * 0.099 {
    			mud.setTrackMass(j)
    			l, u, ok := mud.approxInvCumulativeSum()
    			inv, ok2 := mud.invCumulativeSum(j)
    			if !ok || !ok2 {
    				t.Fatalf("inverse cumulative sum failed: approx %v, exact %v", ok, ok2)
    			}
    			if !(l <= inv && inv < u) {
    				t.Fatalf("inverse(%g) = %g, not ∈ [%g, %g)", j, inv, l, u)
    			}
    		}
    	}
    }
    
    func TestMUDTracking(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  6. src/crypto/internal/nistec/p256_ordinv_test.go

    		t.Error("unexpected output for inv(1)")
    	}
    	new(big.Int).Add(N, big.NewInt(1)).FillBytes(input)
    	out, err = nistec.P256OrdInverse(input)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !bytes.Equal(out, exp) {
    		t.Error("unexpected output for inv(N+1)")
    	}
    
    	// Check inv(20) and inv(N+20) against math/big
    	exp = new(big.Int).ModInverse(big.NewInt(20), N).FillBytes(make([]byte, 32))
    	big.NewInt(20).FillBytes(input)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

        for (Entry<K, V> entry : entries) {
          Entry<V, K> reversed = reverseEntry(entry);
          BiMap<V, K> inv = getMap().inverse();
          assertFalse(
              "Inverse should not contain entry " + reversed, inv.entrySet().contains(reversed));
          assertFalse(
              "Inverse should not contain key " + reversed.getKey(),
              inv.containsKey(reversed.getKey()));
          assertFalse(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 21 16:49:06 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/AbstractBiMapTester.java

        for (Entry<K, V> entry : entries) {
          Entry<V, K> reversed = reverseEntry(entry);
          BiMap<V, K> inv = getMap().inverse();
          assertFalse(
              "Inverse should not contain entry " + reversed, inv.entrySet().contains(reversed));
          assertFalse(
              "Inverse should not contain key " + reversed.getKey(),
              inv.containsKey(reversed.getKey()));
          assertFalse(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 21 16:49:06 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  9. src/crypto/ecdsa/ecdsa.go

    	// SEC 1, Version 2.0, Section 4.1.3
    
    	k, R, err := randomPoint(c, csprng)
    	if err != nil {
    		return nil, err
    	}
    
    	// kInv = k⁻¹
    	kInv := bigmod.NewNat()
    	inverse(c, kInv, k)
    
    	Rx, err := R.BytesX()
    	if err != nil {
    		return nil, err
    	}
    	r, err := bigmod.NewNat().SetOverflowingBytes(Rx, c.N)
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  10. src/crypto/internal/nistec/p256.go

    }
    
    func (p *P256Point) bytes(out *[1 + 2*p256ElementLength]byte) []byte {
    	if p.z.IsZero() == 1 {
    		return append(out[:0], 0)
    	}
    
    	zinv := new(fiat.P256Element).Invert(p.z)
    	x := new(fiat.P256Element).Mul(p.x, zinv)
    	y := new(fiat.P256Element).Mul(p.y, zinv)
    
    	buf := append(out[:0], 4)
    	buf = append(buf, x.Bytes()...)
    	buf = append(buf, y.Bytes()...)
    	return buf
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 17.2K bytes
    - Viewed (0)
Back to top