Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for HChaCha20 (0.11 sec)

  1. src/vendor/golang.org/x/crypto/chacha20poly1305/xchacha20poly1305.go

    	// memory, and the counter overflows at 256 GB.
    	if uint64(len(plaintext)) > (1<<38)-64 {
    		panic("chacha20poly1305: plaintext too large")
    	}
    
    	c := new(chacha20poly1305)
    	hKey, _ := chacha20.HChaCha20(x.key[:], nonce[0:16])
    	copy(c.key[:], hKey)
    
    	// The first 4 bytes of the final nonce are unused counter space.
    	cNonce := make([]byte, NonceSize)
    	copy(cNonce[4:12], nonce[16:24])
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 09 20:10:44 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/crypto/chacha20/chacha_generic.go

    	// escape to the heap.
    	out := make([]byte, 32)
    	return hChaCha20(out, key, nonce)
    }
    
    func hChaCha20(out, key, nonce []byte) ([]byte, error) {
    	if len(key) != KeySize {
    		return nil, errors.New("chacha20: wrong HChaCha20 key size")
    	}
    	if len(nonce) != 16 {
    		return nil, errors.New("chacha20: wrong HChaCha20 nonce size")
    	}
    
    	x0, x1, x2, x3 := j0, j1, j2, j3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 00:11:50 UTC 2022
    - 13.9K bytes
    - Viewed (0)
  3. internal/kms/secret-key.go

    		if err != nil {
    			return nil, err
    		}
    		aead, err = cipher.NewGCM(block)
    		if err != nil {
    			return nil, err
    		}
    	case kms.ChaCha20:
    		sealingKey, err := chacha20.HChaCha20(s.key, iv)
    		if err != nil {
    			return nil, err
    		}
    		aead, err = chacha20poly1305.New(sealingKey)
    		if err != nil {
    			return nil, err
    		}
    	default:
    		return nil, ErrDecrypt
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top