Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for encodeSignature (0.15 sec)

  1. src/crypto/ecdsa/ecdsa_legacy.go

    			}
    		}
    
    		e := hashToInt(hash, c)
    		s = new(big.Int).Mul(priv.D, r)
    		s.Add(s, e)
    		s.Mul(s, kInv)
    		s.Mod(s, N) // N != 0
    		if s.Sign() != 0 {
    			break
    		}
    	}
    
    	return encodeSignature(r.Bytes(), s.Bytes())
    }
    
    // Verify verifies the signature in r, s of hash using the public key, pub. Its
    // return value records whether the signature is valid. Most applications should
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. src/crypto/ecdsa/ecdsa_s390x.go

    		// adding 128, in order to stop the instruction using its own random number
    		// generator in addition to the random number we supply.
    		switch kdsa(functionCode+136, &params) {
    		case 0: // success
    			return encodeSignature(params[:blockSize], params[blockSize:2*blockSize])
    		case 1: // error
    			return nil, errZeroParam
    		case 2: // retry
    			continue
    		}
    		panic("unreachable")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:29:44 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. src/crypto/ecdsa/ecdsa.go

    	// Again, the chance of this happening is cryptographically negligible.
    	if s.IsZero() == 1 {
    		return nil, errors.New("ecdsa: internal error: s is zero")
    	}
    
    	return encodeSignature(r.Bytes(c.N), s.Bytes(c.N))
    }
    
    func encodeSignature(r, s []byte) ([]byte, error) {
    	var b cryptobyte.Builder
    	b.AddASN1(asn1.SEQUENCE, func(b *cryptobyte.Builder) {
    		addASN1IntBytes(b, r)
    		addASN1IntBytes(b, s)
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 20.4K bytes
    - Viewed (0)
Back to top