Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for EMSAPSSVerify (0.18 sec)

  1. src/crypto/rsa/rsa_export_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package rsa
    
    var NonZeroRandomBytes = nonZeroRandomBytes
    var EMSAPSSEncode = emsaPSSEncode
    var EMSAPSSVerify = emsaPSSVerify
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 00:16:30 UTC 2022
    - 327 bytes
    - Viewed (0)
  2. src/crypto/rsa/pss.go

    	//     maskedDB to zero.
    
    	db[0] &= 0xff >> (8*emLen - emBits)
    
    	// 12. Let EM = maskedDB || H || 0xbc.
    	em[emLen-1] = 0xbc
    
    	// 13. Output EM.
    	return em, nil
    }
    
    func emsaPSSVerify(mHash, em []byte, emBits, sLen int, hash hash.Hash) error {
    	// See RFC 8017, Section 9.1.2.
    
    	hLen := hash.Size()
    	if sLen == PSSSaltLengthEqualsHash {
    		sLen = hLen
    	}
    	emLen := (emBits + 7) / 8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. src/crypto/rsa/pss_test.go

    	if err != nil {
    		t.Errorf("Error from emsaPSSEncode: %s\n", err)
    	}
    	if !bytes.Equal(encoded, expected) {
    		t.Errorf("Bad encoding. got %x, want %x", encoded, expected)
    	}
    
    	if err = EMSAPSSVerify(hashed, encoded, 1023, len(salt), sha1.New()); err != nil {
    		t.Errorf("Bad verification: %s", err)
    	}
    }
    
    // TestPSSGolden tests all the test vectors in pss-vect.txt from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 8.8K bytes
    - Viewed (0)
Back to top