Deleted Added
full compact
padlock.h (208834) padlock.h (230426)
1/*-
2 * Copyright (c) 2005-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2005-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/crypto/via/padlock.h 208834 2010-06-05 16:00:53Z kib $
26 * $FreeBSD: head/sys/crypto/via/padlock.h 230426 2012-01-21 17:45:27Z kib $
27 */
28
29#ifndef _PADLOCK_H_
30#define _PADLOCK_H_
31
32#include <opencrypto/cryptodev.h>
33#include <crypto/rijndael/rijndael.h>
34

--- 36 unchanged lines hidden (view full) ---

71 uint8_t ses_iv[16] __aligned(16); /* 128 bit aligned */
72 struct auth_hash *ses_axf;
73 uint8_t *ses_ictx;
74 uint8_t *ses_octx;
75 int ses_mlen;
76 int ses_used;
77 uint32_t ses_id;
78 TAILQ_ENTRY(padlock_session) ses_next;
27 */
28
29#ifndef _PADLOCK_H_
30#define _PADLOCK_H_
31
32#include <opencrypto/cryptodev.h>
33#include <crypto/rijndael/rijndael.h>
34

--- 36 unchanged lines hidden (view full) ---

71 uint8_t ses_iv[16] __aligned(16); /* 128 bit aligned */
72 struct auth_hash *ses_axf;
73 uint8_t *ses_ictx;
74 uint8_t *ses_octx;
75 int ses_mlen;
76 int ses_used;
77 uint32_t ses_id;
78 TAILQ_ENTRY(padlock_session) ses_next;
79 struct fpu_kern_ctx ses_fpu_ctx;
79 struct fpu_kern_ctx *ses_fpu_ctx;
80};
81
82#define PADLOCK_ALIGN(p) (void *)(roundup2((uintptr_t)(p), 16))
83
84int padlock_cipher_setup(struct padlock_session *ses,
85 struct cryptoini *encini);
86int padlock_cipher_process(struct padlock_session *ses,
87 struct cryptodesc *enccrd, struct cryptop *crp);
88int padlock_hash_setup(struct padlock_session *ses,
89 struct cryptoini *macini);
90int padlock_hash_process(struct padlock_session *ses,
91 struct cryptodesc *maccrd, struct cryptop *crp);
92void padlock_hash_free(struct padlock_session *ses);
93
94#endif /* !_PADLOCK_H_ */
80};
81
82#define PADLOCK_ALIGN(p) (void *)(roundup2((uintptr_t)(p), 16))
83
84int padlock_cipher_setup(struct padlock_session *ses,
85 struct cryptoini *encini);
86int padlock_cipher_process(struct padlock_session *ses,
87 struct cryptodesc *enccrd, struct cryptop *crp);
88int padlock_hash_setup(struct padlock_session *ses,
89 struct cryptoini *macini);
90int padlock_hash_process(struct padlock_session *ses,
91 struct cryptodesc *maccrd, struct cryptop *crp);
92void padlock_hash_free(struct padlock_session *ses);
93
94#endif /* !_PADLOCK_H_ */