MCPcopy Create free account
hub / github.com/F-Stack/f-stack / padlock_cbc

Function padlock_cbc

freebsd/crypto/via/padlock_cipher.c:82–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80MALLOC_DECLARE(M_PADLOCK);
81
82static __inline void
83padlock_cbc(void *in, void *out, size_t count, void *key, union padlock_cw *cw,
84 void *iv)
85{
86#ifdef __GNUCLIKE_ASM
87 /* The .byte line is really VIA C3 "xcrypt-cbc" instruction */
88 __asm __volatile(
89 "pushf \n\t"
90 "popf \n\t"
91 "rep \n\t"
92 ".byte 0x0f, 0xa7, 0xd0"
93 : "+a" (iv), "+c" (count), "+D" (out), "+S" (in)
94 : "b" (key), "d" (cw)
95 : "cc", "memory"
96 );
97#endif
98}
99
100static void
101padlock_cipher_key_setup(struct padlock_session *ses, const void *key, int klen)

Callers 1

padlock_cipher_processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected