Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for HChaCha20 (0.13 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. 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