~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/crypto/sha512-glue.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm64/crypto/sha512-glue.c (Version linux-6.11.5) and /arch/sparc64/crypto/sha512-glue.c (Version linux-5.16.20)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3  * Linux/arm64 port of the OpenSSL SHA512 impl    
  4  *                                                
  5  * Copyright (c) 2016 Linaro Ltd. <ard.biesheu    
  6  */                                               
  7                                                   
  8 #include <crypto/internal/hash.h>                 
  9 #include <linux/types.h>                          
 10 #include <linux/string.h>                         
 11 #include <crypto/sha2.h>                          
 12 #include <crypto/sha512_base.h>                   
 13 #include <asm/neon.h>                             
 14                                                   
 15 MODULE_DESCRIPTION("SHA-384/SHA-512 secure has    
 16 MODULE_AUTHOR("Andy Polyakov <appro@openssl.or    
 17 MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@    
 18 MODULE_LICENSE("GPL v2");                         
 19 MODULE_ALIAS_CRYPTO("sha384");                    
 20 MODULE_ALIAS_CRYPTO("sha512");                    
 21                                                   
 22 asmlinkage void sha512_block_data_order(u64 *d    
 23                                         unsign    
 24 EXPORT_SYMBOL(sha512_block_data_order);           
 25                                                   
 26 static void sha512_arm64_transform(struct sha5    
 27                                    int blocks)    
 28 {                                                 
 29         sha512_block_data_order(sst->state, sr    
 30 }                                                 
 31                                                   
 32 static int sha512_update(struct shash_desc *de    
 33                          unsigned int len)        
 34 {                                                 
 35         return sha512_base_do_update(desc, dat    
 36 }                                                 
 37                                                   
 38 static int sha512_finup(struct shash_desc *des    
 39                         unsigned int len, u8 *    
 40 {                                                 
 41         if (len)                                  
 42                 sha512_base_do_update(desc, da    
 43         sha512_base_do_finalize(desc, sha512_a    
 44                                                   
 45         return sha512_base_finish(desc, out);     
 46 }                                                 
 47                                                   
 48 static int sha512_final(struct shash_desc *des    
 49 {                                                 
 50         return sha512_finup(desc, NULL, 0, out    
 51 }                                                 
 52                                                   
 53 static struct shash_alg algs[] = { {              
 54         .digestsize             = SHA512_DIGES    
 55         .init                   = sha512_base_    
 56         .update                 = sha512_updat    
 57         .final                  = sha512_final    
 58         .finup                  = sha512_finup    
 59         .descsize               = sizeof(struc    
 60         .base.cra_name          = "sha512",       
 61         .base.cra_driver_name   = "sha512-arm6    
 62         .base.cra_priority      = 150,            
 63         .base.cra_blocksize     = SHA512_BLOCK    
 64         .base.cra_module        = THIS_MODULE,    
 65 }, {                                              
 66         .digestsize             = SHA384_DIGES    
 67         .init                   = sha384_base_    
 68         .update                 = sha512_updat    
 69         .final                  = sha512_final    
 70         .finup                  = sha512_finup    
 71         .descsize               = sizeof(struc    
 72         .base.cra_name          = "sha384",       
 73         .base.cra_driver_name   = "sha384-arm6    
 74         .base.cra_priority      = 150,            
 75         .base.cra_blocksize     = SHA384_BLOCK    
 76         .base.cra_module        = THIS_MODULE,    
 77 } };                                              
 78                                                   
 79 static int __init sha512_mod_init(void)           
 80 {                                                 
 81         return crypto_register_shashes(algs, A    
 82 }                                                 
 83                                                   
 84 static void __exit sha512_mod_fini(void)          
 85 {                                                 
 86         crypto_unregister_shashes(algs, ARRAY_    
 87 }                                                 
 88                                                   
 89 module_init(sha512_mod_init);                     
 90 module_exit(sha512_mod_fini);                     
 91                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php