Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mgf1XOR (0.23 sec)

  1. src/crypto/rsa/rsa.go

    	if c[3]++; c[3] != 0 {
    		return
    	}
    	if c[2]++; c[2] != 0 {
    		return
    	}
    	if c[1]++; c[1] != 0 {
    		return
    	}
    	c[0]++
    }
    
    // mgf1XOR XORs the bytes in out with a mask generated using the MGF1 function
    // specified in PKCS #1 v2.1.
    func mgf1XOR(out []byte, hash hash.Hash, seed []byte) {
    	var counter [4]byte
    	var digest []byte
    
    	done := 0
    	for done < len(out) {
    		hash.Write(seed)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  2. src/crypto/rsa/pss.go

    	//     emLen - hLen - 1.
    
    	db[psLen] = 0x01
    	copy(db[psLen+1:], salt)
    
    	// 9.  Let dbMask = MGF(H, emLen - hLen - 1).
    	//
    	// 10. Let maskedDB = DB \xor dbMask.
    
    	mgf1XOR(db, hash, h)
    
    	// 11. Set the leftmost 8 * emLen - emBits bits of the leftmost octet in
    	//     maskedDB to zero.
    
    	db[0] &= 0xff >> (8*emLen - emBits)
    
    	// 12. Let EM = maskedDB || H || 0xbc.
    	em[emLen-1] = 0xbc
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top