Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / nettle.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages nettle)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages multiprecision)
25 #:use-module (gnu packages m4))
26
27 (define-public nettle
28 (package
29 (name "nettle")
30 (version "2.7")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "mirror://gnu/nettle/nettle-"
34 version ".tar.gz"))
35 (sha256
36 (base32
37 "1mnl5i1136p47lrklm0mhnnv3gjakza385zvxz12qf057h9ym562"))))
38 (build-system gnu-build-system)
39 (inputs `(("m4" ,m4)))
40 (propagated-inputs `(("gmp" ,gmp)))
41 (home-page "http://www.lysator.liu.se/~nisse/nettle/")
42 (synopsis "C library for low-level crytographic functionality")
43 (description
44 "Nettle is a cryptographic library that is designed to fit easily
45 in more or less any context: In crypto toolkits for object-oriented
46 languages (C++, Python, Pike, ...), in applications like LSH or GNUPG,
47 or even in kernel space. In most contexts, you need more than the basic
48 cryptographic algorithms, you also need some way to keep track of
49 available algorithms, their properties and variants. You often have
50 some algorithm selection process, often dictated by a protocol you want
51 to implement.
52
53 And as the requirements of applications differ in subtle and not so
54 subtle ways, an API that fits one application well can be a pain to use
55 in a different context. And that is why there are so many different
56 cryptographic libraries around. \nNettle tries to avoid this problem by
57 doing one thing, the low-level crypto stuff, and providing a simple but
58 general interface to it. In particular, Nettle doesn't do algorithm
59 selection. It doesn't do memory allocation. It doesn't do any I/O.")
60 (license gpl2+)))