24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public licence as published by
    the free software foundation either version 2 of the licence or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 114 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520170857.552531963@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

18 Apr, 2019

2 commits

  • Use subsys_initcall for registration of all templates and generic
    algorithm implementations, rather than module_init. Then change
    cryptomgr to use arch_initcall, to place it before the subsys_initcalls.

    This is needed so that when both a generic and optimized implementation
    of an algorithm are built into the kernel (not loadable modules), the
    generic implementation is registered before the optimized one.
    Otherwise, the self-tests for the optimized implementation are unable to
    allocate the generic implementation for the new comparison fuzz tests.

    Note that on arm, a side effect of this change is that self-tests for
    generic implementations may run before the unaligned access handler has
    been installed. So, unaligned accesses will crash the kernel. This is
    arguably a good thing as it makes it easier to detect that type of bug.

    Signed-off-by: Eric Biggers
    Signed-off-by: Herbert Xu

    Eric Biggers
     
  • In preparation for new akcipher verify call remove sign/verify callbacks
    from RSA backends and make PKCS1 driver call encrypt/decrypt instead.

    This also complies with the well-known idea that raw RSA should never be
    used for sign/verify. It only should be used with proper padding scheme
    such as PKCS1 driver provides.

    Cc: Giovanni Cabiddu
    Cc: qat-linux@intel.com
    Cc: Tom Lendacky
    Cc: Gary Hook
    Cc: Horia Geantă
    Cc: Aymen Sghaier
    Signed-off-by: Vitaly Chikunov
    Reviewed-by: Horia Geantă
    Acked-by: Gary R Hook
    Signed-off-by: Herbert Xu

    Vitaly Chikunov
     

21 Apr, 2018

1 commit

  • There is no need to assign an error value to 'ret' prior
    to calling mpi_read_raw_from_sgl() because in the case
    of error the 'ret' variable will be assigned to the error
    code inside the if block.

    In the case of non failure, 'ret' will be overwritten
    immediately after, so remove the unneeded assignment.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Herbert Xu

    Fabio Estevam
     

10 Jun, 2017

1 commit


01 Jul, 2016

1 commit

  • Every implementation of RSA that we have naturally generates
    output with leading zeroes. The one and only user of RSA,
    pkcs1pad wants to have those leading zeroes in place, in fact
    because they are currently absent it has to write those zeroes
    itself.

    So we shouldn't be stripping leading zeroes in the first place.
    In fact this patch makes rsa-generic produce output with fixed
    length so that pkcs1pad does not need to do any extra work.

    This patch also changes DH to use the new interface.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

15 Jun, 2016

1 commit

  • Return the raw key with no other processing so that the caller
    can copy it or MPI parse it, etc.

    The scope is to have only one ANS.1 parser for all RSA
    implementations.

    Update the RSA software implementation so that it does
    the MPI conversion on top.

    Signed-off-by: Tudor Ambarus
    Signed-off-by: Herbert Xu

    Tudor Ambarus
     

09 Dec, 2015

1 commit

  • This patch adds PKCS#1 v1.5 standard RSA padding as a separate template.
    This way an RSA cipher with padding can be obtained by instantiating
    "pkcs1pad(rsa)". The reason for adding this is that RSA is almost
    never used without this padding (or OAEP) so it will be needed for
    either certificate work in the kernel or the userspace, and I also hear
    that it is likely implemented by hardware RSA in which case hardware
    implementations of the whole of pkcs1pad(rsa) can be provided.

    Signed-off-by: Andrew Zaborowski
    Signed-off-by: Herbert Xu

    Andrzej Zaborowski
     

17 Nov, 2015

1 commit

  • rhe RSA operations explicitly left-align the integers being written
    skipping any leading zero bytes, but still require the output buffers to
    include just enough space for the integer + the leading zero bytes.
    Since the size of integer + the leading zero bytes (i.e. the key modulus
    size) can now be obtained more easily through crypto_akcipher_maxsize
    change the operations to only require as big a buffer as actually needed
    if the caller has that information. The semantics for request->dst_len
    don't change.

    Signed-off-by: Andrew Zaborowski
    Signed-off-by: Herbert Xu

    Andrzej Zaborowski
     

14 Oct, 2015

1 commit

  • Setkey function has been split into set_priv_key and set_pub_key.
    Akcipher requests takes sgl for src and dst instead of void *.
    Users of the API i.e. two existing RSA implementation and
    test mgr code have been updated accordingly.

    Signed-off-by: Tadeusz Struk
    Signed-off-by: Herbert Xu

    Tadeusz Struk
     

17 Jul, 2015

1 commit


17 Jun, 2015

1 commit