- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for CryptBlocks (0.14 sec)
-
src/crypto/cipher/cipher.go
// BlockSize returns the mode's block size. BlockSize() int // CryptBlocks encrypts or decrypts a number of blocks. The length of // src must be a multiple of the block size. Dst and src must overlap // entirely or not at all. // // If len(dst) < len(src), CryptBlocks should panic. It is acceptable // to pass a dst bigger than src, and in that case, CryptBlocks will // only update dst[:len(src)] and will not touch the rest of dst. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 03:55:33 UTC 2022 - 2.4K bytes - Viewed (0) -
src/crypto/aes/cipher_s390x.go
key []byte // key (128, 192 or 256 bits) storage [32]byte // array backing key slice } // cryptBlocks invokes the cipher message (KM) instruction with // the given function code. This is equivalent to AES in ECB // mode. The length must be a multiple of BlockSize (16). // //go:noescape func cryptBlocks(c code, key, dst, src *byte, length int) func newCipher(key []byte) (cipher.Block, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 2.6K bytes - Viewed (0) -
src/crypto/cipher/fuzz_test.go
outdata := make([]byte, datalen) fuzzencrypt: for { select { case <-timeout.C: break fuzzencrypt default: } rand.Read(indata[:]) cbcGeneric.CryptBlocks(indata, outgeneric) cbcAsm.CryptBlocks(indata, outdata) if !bytes.Equal(outdata, outgeneric) { t.Fatalf("AES-CBC encryption does not match reference result: %x and %x, please report this error to ******@****.***", outdata, outgeneric)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 03 13:39:12 UTC 2022 - 2K bytes - Viewed (0) -
src/crypto/cipher/cbc.go
panic("cipher.NewCBCEncrypter: IV length must equal block size") } return (*cbcEncrypter)(newCBC(b, iv)) } func (x *cbcEncrypter) BlockSize() int { return x.blockSize } func (x *cbcEncrypter) CryptBlocks(dst, src []byte) { if len(src)%x.blockSize != 0 { panic("crypto/cipher: input not full blocks") } if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 28 03:55:33 UTC 2022 - 5.4K bytes - Viewed (0) -
src/crypto/aes/cbc_s390x.go
// with the given function code. The length must be a multiple of BlockSize (16). // //go:noescape func cryptBlocksChain(c code, iv, key, dst, src *byte, length int) func (x *cbc) CryptBlocks(dst, src []byte) { if len(src)%BlockSize != 0 { panic("crypto/cipher: input not full blocks") } if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 1.6K bytes - Viewed (0) -
src/crypto/aes/cbc_ppc64x.go
// cryptBlocksChain invokes the cipher message identifying encrypt or decrypt. // //go:noescape func cryptBlocksChain(src, dst *byte, length int, key *uint32, iv *byte, enc int, nr int) func (x *cbc) CryptBlocks(dst, src []byte) { if len(src)%BlockSize != 0 { panic("crypto/cipher: input not full blocks") } if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:31 UTC 2024 - 1.7K bytes - Viewed (0) -
src/crypto/aes/asm_s390x.s
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !purego #include "textflag.h" // func cryptBlocks(c code, key, dst, src *byte, length int) TEXT ยทcryptBlocks(SB),NOSPLIT,$0-40 MOVD key+8(FP), R1 MOVD dst+16(FP), R2 MOVD src+24(FP), R4 MOVD length+32(FP), R5 MOVD c+0(FP), R0 loop: KM R2, R4 // cipher message (KM)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 4.4K bytes - Viewed (0) -
src/crypto/x509/pem_decrypt.go
return nil, errors.New("x509: encrypted PEM data is not a multiple of the block size") } data := make([]byte, len(b.Bytes)) dec := cipher.NewCBCDecrypter(block, iv) dec.CryptBlocks(data, b.Bytes) // Blocks are padded using a scheme where the last n bytes of padding are all // equal to n. It can pad from 1 to blocksize bytes inclusive. See RFC 1423. // For example: // [x y z 2 2]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 17:09:47 UTC 2023 - 7.2K bytes - Viewed (0) -
src/crypto/aes/ctr_s390x.go
// Increment in big endian: c0 is high, c1 is low. c1++ if c1 == 0 { // add carry c0++ } } c.ctr[0], c.ctr[1] = c0, c1 // Encrypt the buffer using AES in ECB mode. cryptBlocks(c.block.function, &c.block.key[0], &c.buffer[0], &c.buffer[0], streamBufferSize) } func (c *aesctr) XORKeyStream(dst, src []byte) { if len(dst) < len(src) { panic("crypto/cipher: output smaller than input") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 2.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go
if len(data)%blockSize != 0 { return nil, false, errInvalidBlockSize } result := make([]byte, len(data)) copy(result, data) mode := cipher.NewCBCDecrypter(t.block, iv) mode.CryptBlocks(result, result) // remove and verify PKCS#7 padding for CBC c := result[len(result)-1] paddingSize := int(c) size := len(result) - paddingSize if paddingSize == 0 || paddingSize > len(result) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 21 19:25:52 UTC 2023 - 9.6K bytes - Viewed (0)