summaryrefslogtreecommitdiff
path: root/curve.h
blob: 1b3a9195dddb867f1170c781f469dfbb8377e73f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef CURVE_H
#define CURVE_H

#include "locking.h"
#include "built_in.h"
#include "ioops.h"
#include "rnd.h"
#include "taia.h"
#include "crypto.h"

struct curve25519_proto {
	unsigned char enonce[crypto_box_noncebytes] __aligned_16;
	unsigned char dnonce[crypto_box_noncebytes] __aligned_16;
	unsigned char key[crypto_box_beforenmbytes] __aligned_16;
};

struct curve25519_struct {
	unsigned char *enc, *dec;
	size_t enc_size, dec_size;
	struct spinlock enc_lock, dec_lock;
};

extern void curve25519_selftest(void);

extern struct curve25519_struct *curve25519_tfm_alloc(void);
extern void curve25519_tfm_free(struct curve25519_struct *tfm);
extern void curve25519_tfm_free_void(void *tfm);

extern void curve25519_proto_init(struct curve25519_proto *proto,
				  unsigned char *pubkey_remote, size_t len);
extern int curve25519_pubkey_hexparse_32(unsigned char *bin, size_t blen,
					 const char *ascii, size_t alen);

extern ssize_t curve25519_encode(struct curve25519_struct *curve,
				 struct curve25519_proto *proto,
				 unsigned char *plaintext, size_t size,
				 unsigned char **ciphertext);
extern ssize_t curve25519_decode(struct curve25519_struct *curve,
				 struct curve25519_proto *proto,
				 unsigned char *ciphertext, size_t size,
				 unsigned char **plaintext,
				 struct taia *arrival_taia);

#endif /* CURVE_H */
7'>1056c9bd2702ea1bb79abf9bd1e78c578589d247 (diff)parent099c0cbd2025192f098e6da7f3c8118f6833dfe9 (diff)
Merge tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring: - remove most of_platform_populate() calls in arch code. Now the DT core code calls it in the default case and platforms only need to call it if they have special needs - use pr_fmt on all the DT core print statements - CoreSight binding doc improvements to block name descriptions - add dt_to_config script which can parse dts files and list corresponding kernel config options - fix memory leak hit with a PowerMac DT - correct a bunch of STMicro compatible strings to use the correct vendor prefix - fix DA9052 PMIC binding doc to match what is actually used in dts files * tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (35 commits) documentation: da9052: Update regulator bindings names to match DA9052/53 DTS expectations xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" xtensa: Fix build error due to missing include file MIPS: ath79: Add missing include file Fix spelling errors in Documentation/devicetree ARM: dts: fix STMicroelectronics compatible strings powerpc/dts: fix STMicroelectronics compatible strings Documentation: dt: i2c: use correct STMicroelectronics vendor prefix scripts/dtc: dt_to_config - kernel config options for a devicetree of: fdt: mark unflattened tree as detached of: overlay: add resolver error prints coresight: document binding acronyms Documentation/devicetree: document cavium-pip rx-delay/tx-delay properties of: use pr_fmt prefix for all console printing of/irq: Mark initialised interrupt controllers as populated of: fix memory leak related to safe_name() Revert "of/platform: export of_default_bus_match_table" of: unittest: use of_platform_default_populate() to populate default bus memory: omap-gpmc: use of_platform_default_populate() to populate default bus bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus ...
Diffstat (limited to 'Documentation/devicetree')