mcrypt.scm 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2020 Eric Bavier <bavier@posteo.net>
  3. ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages mcrypt)
  20. #:use-module (guix packages)
  21. #:use-module ((guix licenses) #:select (gpl2+))
  22. #:use-module (guix download)
  23. #:use-module (guix build-system gnu)
  24. #:use-module (gnu packages)
  25. #:use-module (gnu packages compression)
  26. #:use-module (gnu packages perl))
  27. (define-public mcrypt
  28. (package
  29. (name "mcrypt")
  30. (version "2.6.8")
  31. (source
  32. (origin
  33. (method url-fetch)
  34. (uri (string-append "mirror://sourceforge/mcrypt/MCrypt/"
  35. version "/" name "-" version ".tar.gz"))
  36. (sha256
  37. (base32
  38. "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))
  39. (patches (search-patches
  40. "mcrypt-CVE-2012-4409.patch"
  41. "mcrypt-CVE-2012-4426.patch"
  42. "mcrypt-CVE-2012-4527.patch"))))
  43. (build-system gnu-build-system)
  44. (inputs
  45. `(("zlib" ,zlib)
  46. ("libmcrypt" ,libmcrypt)
  47. ("libmhash" ,libmhash)))
  48. (home-page "http://mcrypt.sourceforge.net/")
  49. (synopsis "Replacement for the popular Unix crypt command")
  50. (description
  51. "MCrypt is a replacement for the old crypt() package and crypt(1)
  52. command, with extensions. It allows developers to use a wide range of
  53. encryption functions, without making drastic changes to their code. It allows
  54. users to encrypt files or data streams without having to be cryptographers.
  55. The companion to MCrypt is Libmcrypt, which contains the actual encryption
  56. functions themselves, and provides a standardized mechanism for accessing
  57. them.")
  58. (license gpl2+)))
  59. (define-public libmcrypt
  60. (package
  61. (name "libmcrypt")
  62. (version "2.5.8")
  63. (source
  64. (origin
  65. (method url-fetch)
  66. (uri (string-append "mirror://sourceforge/mcrypt/Libmcrypt/" version
  67. "/libmcrypt-" version ".tar.gz"))
  68. (sha256
  69. (base32
  70. "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
  71. (build-system gnu-build-system)
  72. (home-page "http://mcrypt.sourceforge.net/")
  73. (synopsis "Encryption algorithm library")
  74. (description
  75. "Libmcrypt is a data encryption library. The library is thread safe and
  76. provides encryption and decryption functions. This version of the library
  77. supports many encryption algorithms and encryption modes. Some algorithms
  78. which are supported: SERPENT, RIJNDAEL, 3DES, GOST, SAFER+, CAST-256, RC2,
  79. XTEA, 3WAY, TWOFISH, BLOWFISH, ARCFOUR, WAKE and more.")
  80. (license gpl2+)))
  81. (define-public libmhash
  82. (package
  83. (name "libmhash")
  84. (version "0.9.9.9")
  85. (source
  86. (origin
  87. (method url-fetch)
  88. (uri (string-append "mirror://sourceforge/mhash/mhash/" version
  89. "/mhash-" version ".tar.bz2"))
  90. (sha256
  91. (base32
  92. "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))
  93. (patches (search-patches "mhash-keygen-test-segfault.patch"
  94. "libmhash-hmac-fix-uaf.patch"))))
  95. (build-system gnu-build-system)
  96. (native-inputs
  97. `(("perl" ,perl))) ;for tests
  98. (home-page "http://mhash.sourceforge.net/")
  99. (synopsis "Thread-safe hash library")
  100. (description
  101. "Mhash is a thread-safe hash library, implemented in C, and provides a
  102. uniform interface to a large number of hash algorithms. These algorithms can
  103. be used to compute checksums, message digests, and other signatures. The HMAC
  104. support implements the basics for message authentication, following RFC 2104.
  105. Algorithms currently supplied are:
  106. CRC-32, CRC-32B, ALDER-32, MD-2, MD-4, MD-5, RIPEMD-128, RIPEMD-160,
  107. RIPEMD-256, RIPEMD-320, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, HAVAL-128,
  108. HAVAL-160, HAVAL-192, HAVAL-256, TIGER, TIGER-128, TIGER-160, GOST, WHIRLPOOL,
  109. SNEFRU-128, SNEFRU-256.")
  110. (license gpl2+)))