/fs/squashfs/

The LITMUS^RT kernel.Bjoern Brandenburg
aboutsummaryrefslogblamecommitdiffstats
path: root/crypto/tcrypt.h
blob: 47bc0ecb89787e006fd92e51d229b1edd2880ea7 (plain) (tree)
1
2
3
4
5
6
7
8
9
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620







                                                                
                                            


                                                                             
                                                                            

                     
                             
                                
                                                     

                                                                     











                                  
                                                  


                        
                                   

                            


                            
                       



                     

                                   

                                             
                           

                            

  
                     




                     









                                             

  
                   



                                                       

                              







                                                 

                                                             


                                 

                                                             


                                   

                                                             


                                              

                                                            


                                                          

                                                             




                                                                                              

                                                             

                                                                                              
                                               
                             

                                                             









                                                

                                                             


                                 

                                                             


                                   

                                                             


                                              

                                                             


                                                          

                                                             




                                                                                              

                                                             

                                                                                             
                                                
                             

                                                             








                                                 
         

                                   

                                                                     


                                                                                        

                                                                     




                                    









                                                   



                                                            



                                                                           



                                                            




                                    




                                     

                                                   

                                   



                                                             


                                                                                        



                                                             










                                                   
         

                                  





                                                             


                                                                                        





                                                             

                                                                                       
                                                                                      
                              





                                                             

                                                                                       
                                                                              
                              





                                                             










                                                   
         

                                   







                                                             


                                                                                        







                                                             

                                                                                       
                                                                                      
                              







                                                             

                                                                                       
                                                                              
                              







                                                             






                                            
                                                





                                                                     
         

                                







                                                             




                                 







                                                             


                                   







                                                             


                                              







                                                             


                                                          







                                                             

                                                         
                                                                  
                             







                                                             

                                                                       
                                                                      
                             







                                                             


                                                                







                                                             





                                                  
         

                                





                                                             




                                 





                                                             


                                   





                                                             


                                              





                                                             


                                                          





                                                             

                                                         
                                                                  
                             





                                                             

                                                                       
                                                                      
                             





                                                             


                                                                





                                                             





                                                  
         

                                



                                                             




                                 



                                                             


                                   



                                                             


                                              



                                                             


                                                          



                                                             

                                                         
                                                                  
                             



                                                             

                                                                       
                                                                      
                             



                                                             


                                                                



                                                             



          
                                        






                                                   


                                                             


                                   


                                                             


                                     


                                                             


                                                                                                


                                                             


                                                                                                


                                                             

                                                                 


                                                                        
                              


                                                             








                                                   


                                                            


                                   


                                                            


                                     


                                                            


                                                                                                


                                                            


                                                                                                


                                                            

                                                                 


                                                                        
                              


                                                            








                                                   

                                                             


                                   

                                                             


                                     

                                                             


                                                                                                

                                                             


                                                                                                

                                                             

                                                                 


                                                                        
                              

                                                             


          





                                              
                                                   
 
         
                                                                                             


                                        

                                                             
            
                                 


                                                            

                                                             


                                  
                                                                                             
                             



                                                                               
                             

                                                             
            


                                                                 
                             



                                                                               
                             

                                                             
            
                                                                                             


                                                    









                                                                                


                                                                                      









                                                                                

                                                                                         
                                             
                             

                                                             







                                      
                                                      
         
                                                                                                             


                                        


                                                                
            
                                 


                                                            

                                                                     


                                    
                                                                                                             
                             



                                                                               
                             

                                                                     
            


                                                                 
                             



                                                                               
                             

                                                                     
            
                                                                                                             


                                                    









                                                                                


                                                                                      









                                                                                

                                                                                         
                                             
                             

                                                                     


          







                                                        


                                                            

                                   
                                                                
                            



                                                            
            
                                 

                                                      



                                                               
                             



                                                            


                                        
















                                                            

                                                                                






                                                               
                             





















                                                            



                                                                               


















                                                               
                              



                                                            


          





                                          
                                                        
         



                                                             


                                   








                                                             


                                                                                        








                                                             

                                                                                       
                                                                                      
                              







                                                                                


                                        



                                                             




                                                            



                                                             


                                    


                                                                              
                             



                                                                               
                             









                                                             
                             



                                                                               
                             







                                                                                


                                                    











                                                                                


                                                                                      











                                                                                

                                                                                     
                                                 
                             



                                                             


          



                                                        




                                                             


                             




                                                             


                             





                                                                


                             






                                                               




                                     







                                                                


                             








                                                               






                                     
  






                                                        


                                                            
                             
                                        
                            







                                                             
                            
                                                            
                             





                                                             


                                        
















                                                            
                              

                                                               
                             























                                                             
                              









                                               
                              





                                                             










                                                        


                                                            
                             
                                        
                            









                                                             
                            
                                                            
                             







                                                             


                                        
















                                                            
                              



                                               
                             

























                                                            
                              










                                            
                              







                                                            



          










                                                      
                                                             
                            
                                                             
                            
                                                             

                                                      
                                                             
                            
                                                             
                            
                                                             

                                     
                                                             
                            
                                                             
                            
                                                             

                               
                                                             
                            


                                                             
                             


                                                             



                             
                                                             
                            
                                                             
                            
                                                             

                                                                    
                                                             
                            

                                                             
                             

                                                             



                                                                      
                                                             
                            



                                                             
                             



                                                             

                             
                                       
            
                                                             
                            


                                                             
                             


                                                             

                             
                                         
            
                                                             
                            

                                                             
                             

                                                             

                             
                                           
            
                                                             
                            
                                                             
                            
                                                             

                            
                                                    




                                                      
                                                             
                            
                                                             
                            
                                                             

                                     
                                                             
                            
                                                             
                            
                                                             

                                                
                                                             
                            

                                                             
                             

                                                             



                                  
                                                             
                            

                                                             
                             

                                                             







                                                          
                                                             
                            



                                                             
                             


                                                             

                              
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            

                                                             
                            
                                                             
                            
            
                                                             
                            

                                                             
                            
                                                             
                            
                                                           
                               
                                                             
                            



                                                             
                             


                                                             







                                                          
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            

                                                             
                            
                                                             
                            
                                                   
                                                             
                            

                                                             
                            
                                                             










                                                                  


                                                             
                             
                                                             
                            
                                                             

                            


                                                             
                             
                                                             
                            
                                                             

                            


                                                             
                             
                                                             
                            
                                                             





                                                           


                                                             
                             
                                                             
                            
                                                             

                            


                                                             
                             
                                                             
                            
                                                             

                            


                                                             
                             
                                                             
                            
                                                             













                                                     
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             
                            
                                        

                                                             
                             
                                                             
                            
                                                             

                            


                                                            
                             
                                                             
                            
                                                             

                                       






                                                             
                             
                                                             
                            
                                                             





                                                     
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             
                            
                                        

                                                             
                             
                                                             
                            
                                                             

                            


                                                            
                             
                                                             
                            
                                                             

                                                                            






                                                             
                             
                                                             
                            
                                                             





                                                         

                                                             
                             




                                                             
                             



                                                             





                                                         

                                                             
                             




                                                             
                             



                                                             













                                                     
                                        
                             
                                        
                             

                                                             

                             


                                                             
                             
                                        
                             

                                                             

                             



                                                             
                             
                                        
                             

                                                             





                                                     
                                        
                             

                                                             
                             
                                        

                             


                                                             
                             

                                                             
                             
                                        

                             



                                                             
                             

                                                             
                             
                                        





                                                         
                                        
                             

                                        
                             

                                                             

                             
                                        
                             


                                                             
                             

                                                             

                             
                                        
                             


                                                             
                             

                                                             

                             
                                        
                             

                                        
                             





                                                             





                                                         
                                        
                             


                                                             
                             
                                        

                             
                                        
                             



                                                             
                             
                                        

                             
                                        
                             



                                                             
                             
                                        

                             
                                        
                             






                                                             
                             
                                        













                                                                    
                                                          
         

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             

                             
                                                                                             
                             
                                        
                             

                                                             



                             
                                                          
                                      



                                                             

                             

                                                             

                                         


                                                             
                             

                                                             
                             

                                                             

                                         



                                                             
                             

                                                             
                             

                                                             

                                     



                                                             
                             

                                                             
                             

                                                             




                             
                                                          
         

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             

                             
                                                                                             
                             

                                                             
                             
                                        



                             
                                                          
         

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             

                                     
                                                                                             
                             

                                                             
                             
                                        








                                      
                                                        
         

                                                             
                             
                                        
                             

                                                             

                             


                                                             
                             
                                        
                             

                                                             

                             



                                                             
                             
                                        
                             

                                                             



                             
                                                        
         

                                                             
                             

                                                             
                             
                                        

                             


                                                             
                             

                                                             
                             
                                        

                             



                                                             
                             

                                                             
                             
                                        









                              

                                  

                                  

                                  
                                  
                                  

                                  

                                  
 
                                                      
                             

                                                             
                             

                                                             
                             

                                                             

                             


                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             



                             
                                                      
                             

                                                             
                             

                                                             
                             

                                                             

                             


                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             



                             

                                                          

                                                             
                             


                                                             
                             

                                                             

                             

                                                             
                             





                                                             
                             



                                                             
                             
                                      


                                                             
                             









                                                             
                             







                                                             

                             



                                                             
                             









                                                             
                             







                                                             
                             




                                                          

                                                             
                             



                                                             
                             
                                             

                             

                                                             
                             





                                                             
                             



                                                             
                             
                                      


                                                             
                             









                                                             
                             







                                                             

                             



                                                             
                             









                                                             
                             







                                                             
                             


          


                                                                         



                                                             
                             



                                                             
                             

                                                             

                               



                                                             
                             



                                                             
                             

                                                             

                               



                                                             
                             



                                                             
                             

                                                             

                               




                                                             
                             



                                                             
                             

                                                             

                               




                                                             
                             



                                                             
                             

                                                             

                               





                                                             
                             



                                                             
                             

                                                             

                               





                                                             
                             



                                                             
                             

                                                             


                                                                            





                                                             
                             

































































                                                             
                              































































                                                             







                                                                         



                                                             
                             



                                                             
                             

                                                             

                               



                                                             
                             



                                                             
                             

                                                              

                               



                                                             
                             



                                                             
                             

                                                             

                               




                                                             
                             



                                                             
                             

                                                             

                               




                                                             
                             



                                                             
                             

                                                             

                               





                                                             
                             



                                                             
                             

                                                             

                               





                                                             
                             



                                                             
                             

                                                             


                                                                            





                                                             
                             

































































                                                             
                              































































                                                             



                              


                                                                    



                                                             
                             





                                                             
                             



                                                             

                             



                                                             
                             





                                                             
                             



                                                             

                             



                                                             
                             





                                                             
                             



                                                             

                             



                                                             
                             

































































                                                             
                              































































                                                             






                                                                    



                                                             
                             





                                                             
                             



                                                              

                             



                                                             
                             





                                                             
                             



                                                             

                             



                                                             
                             





                                                             
                             



                                                             

                             



                                                             
                             

































































                                                             
                              































































                                                             



                              


                                                          


                                                            
                             

                                                             
                             

                                                             

                             


                                                            
                             









                                                             

                             









                                                             

                             



                                                            
                             




                                                             
                             










                                                             
                             

                                                             
                             














                                                             
                             



                                                             
                             

                                   




                                                          
                               


































































































































































































































































































































































































































































































































                                                          
                             

































































































































































































































































































































































































































































































































                                                          
                             




                                                          


                                                            
                             


                                                             
                             
                                             

                             


                                                            
                             









                                                             

                             









                                                             

                             



                                                            
                             




                                                             
                             




                                                             
             




                                                            
                             


                                                             
                             













                                                             
                             



                                                             



                             

                                                                             
                                        
                             

                                                             
                             
            
                                        
                             
                                        
                             



                                                             
                             
            

                                                             
                             









                                                             
                             









                                                             
                             
            

                                                             
                             









                                                            
                             


                                                            
                             









                                                             
                             
            
                                        
                             

                                                             
                             
            
                                        
                             
                                        
                             



                                                             
                             
            


                                                             
                             









                                                             
                             









                                                             
                             
            


                                                             
                             









                                                            
                             


                                                            
                             









                                                             
                             




                                     
                                        
                             

                                                             
                             




                                                                             
                                        
                             



                                                             
                             
                                         
                             
            



                                                             
                             











                                                             
                             







                                                             
                             
            



                                                             
                             











                                                             
                             


                                                            
                             







                                                            
                             
                            
                                     


                                     

                                                             
                             











                                                             
                             







                                                             
                             
            

                                                             
                             











                                                             
                             


                                                            
                             







                                                            
                             
            
                                        
                             



                                                             
                             
                                         
                             
            


                                                             
                             











                                                             
                             







                                                             
                             
            


                                                             
                             











                                                             
                             


                                                            
                             







                                                            
                             


         

                                                        

                                                             
                             


                                                             
                            


                                                            
                             



                                                            

                             

                                                             
                             



                                                             
                             


                                                            
                             



                                                            

                             

                                                             
                             


                                                             
                            



                                                            
                             




                                                            

                             

                                                             
                             



                                                             
                             


                                                            
                             



                                                            

                             

                                                             
                             


                                                             
                            


                                                             
                             



                                                             

                             

                                                             
                             



                                                             
                             


                                                            
                             



                                                            

                             

                                                             
                             


                                                             
                            


                                                            
                             




                                                            





                                                        

                                                             
                             


                                                             
                            



                                                            
                             


                                                            

                             

                                                             
                             



                                                             
                             



                                                            
                             


                                                            

                             

                                                             
                             


                                                             
                            




                                                            
                             



                                                            

                             

                                                             
                             



                                                             
                             



                                                            
                             


                                                            

                             

                                                             
                             


                                                             
                            



                                                             
                             


                                                             

                             

                                                             
                             



                                                             
                             



                                                            
                             


                                                            

                             

                                                             
                             


                                                             
                            




                                                            
                             


                                                            



                             



                                      
                                                        
         

                                                             
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            
                                                 
                            
                                                             
                            
                                                             



                            
                                                        
         

                                                             
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            
                                                 
                            
                                                             
                            
                                                             



                            

                                 



                                 
                                                       
         
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                             
                            


                                                            
                             


                                                            

                             
                                                             
                            



                                                            
                             



                                                            

                             
                                             
                            

                                                            
                             

                                                            

                             

                                                            
                             
                                                             
                            
                                                             



                            
                                                       
         
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                                             
                            
                                                             
                            
                                                             

                            
                                             
                            


                                                            
                             


                                                            

                             
                                                             
                            



                                                            
                             



                                                            

                             
                                             
                            

                                                            
                             

                                                            

                             

                                                            
                             
                                                             
                            
                                                             



                            
  




                                 
                                                      
         
                                        
                             
                                        
                            
                                                             

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             



                             
                                                      
         
                                        
                             
                                                             
                            
                                        

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             



                             

                    



                                 
                                                       
         
                                        
                             
                                        
                            
                                                             

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             
                                                            
                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             



                             
                                                       
         
                                        
                             
                                                             
                            
                                        

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             









                                 

                                                         

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            

                                                            
                             

                                                            
                             

                                                            



                             
                                                         
         

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            

                                                            
                             
                                                             
                            
                                                             

                            

                                                            
                             

                                                            
                             

                                                            














                                                         

                                                             
                             

                                                             
                             

                                                             


                             


                                                            
                             

                                                             
                             

                                                             

                             



                                                            
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                            

                             




                                                             
                             

                                                             
                             

                                                             





                                                         

                                                             
                             

                                                             
                             

                                                             


                             


                                                            
                             

                                                             
                             

                                                             

                             



                                                            
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                            
                             

                                                             

                             






                                                             

                             

                                                             





                                                             

                                                             
                             



                                                             
                             



                                                             

                             




                                                             
                             



                                                             
                             



                                                             





                                                             

                                                             
                             



                                                             
                             



                                                             

                             




                                                             
                             



                                                             
                             



                                                             



                             







                                                       
                                        
                             
                                        
                            
                                                             

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             





                                                       
                                        
                             
                                                             
                            
                                        

                            

                                                             
                             
                                                             
                            
                                                             

                            

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             



                                                             
                             



                                                             



                             







                                                                                        
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            
                                                             

                                                                              





                                                             

                             
                                                             
                            
                                                             

                                                                              





                                                             

                                     
                                                             
                            
                                                             

                                                                              





                                                             







                                                                                        
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            

                                                             
                            
                                                             

                            
                                                             
                            






                                                             



                                                                              
                                                             
                            






                                                             



                                                                              
                                                             
                            






                                                             







                                                                              
  








                                                           

                                                             
                             

                                                             
                             

                                                             

                             


                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             





                                                           

                                                             
                             

                                                             
                             

                                                             

                             


                                                             
                             

                                                             
                             

                                                             

                             



                                                             
                             

                                                             
                             

                                                             





                                                               

                                                             
                             


                                                             
                             

                                                             

                             

                                                             
                             





                                                             
                             



                                                             





                                                               

                                                             
                             



                                                             
                             
                                             

                             

                                                             
                             





                                                             
                             



                                                             




                             






                                                       
                                        
                             

                                                             
                             

                                                             

                             

                                                             
                             
                                        
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             





                                                       
                                        
                             

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             
                                        

                             

                                                             
                             

                                                             
                             

                                                             

                             

                                                             
                             

                                                             
                             

                                                             

                             

  
                                         






                                                                       

                                                            
                             





                                                             
                             




                                                            

                                  

                                                            
                             








                                                             
                             







                                                            

                                   



                                                            
                             














                                                             
                              













                                                            
                              
                                   



                                                            
                             

















                                                             
                              
















                                                            
                              
                                                             



                                                           
                           



































































































































































































































































































































































































































































































































                                                           
                             

































































































































































































































































































































































































































































































































                                                          

                             


  
















































































































































































































                                                             




















                                                            






                                                               



                                                                                             

















                                                                                           






                                                           















                                                            
                                                                                             

                                                                                           


                             




                                                            
                                                               
                                                              



          









                                                               






                                                              



                                                                                          


















                                                                                           






                                                       
















                                                            
                                                                                          

                                                                                           


                             





                                                            
                                                               
                                                              



          



                                             
                                                        
         
                                                          
                           
                                           
                           
                                                             

          
                                                          
                           
                                 
                           
                                                             

          
                                                          
                           
                                  
                           
                                                             

          
                                                          
                           
                                   
                           
                                                             

          
                                                          
                           
                                    
                           
                                                             

          
                                                          
                           
                                       
                           
                                                             


         
  






                                                   
                                             

          
                                          

                           
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           




                                                                
                            
                                             

          
                                          
                           





























                                                                
                             
                                             





                                  

                     






                                                      
 


                     
                                                          
                                      

























                                        
                              
/*
 * Quick & dirty crypto testing module.
 *
 * This will only exist until we have a better testing mechanism
 * (e.g. a char device).
 *
 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
 * Copyright (c) 2007 Nokia Siemens Networks
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * 2007-11-13 Added GCM tests
 * 2007-11-13 Added AEAD support
 * 2006-12-07 Added SHA384 HMAC and SHA512 HMAC tests
 * 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net>
 * 2003-09-14 Changes by Kartikey Mahendra Bhatt
 *
 */
#ifndef _CRYPTO_TCRYPT_H
#define _CRYPTO_TCRYPT_H

#define MAX_DIGEST_SIZE		64
#define MAX_TAP			8

#define MAX_KEYLEN		56
#define MAX_IVLEN		32

struct hash_testvec {
	/* only used with keyed hash algorithms */
	char *key;
	char *plaintext;
	char *digest;
	unsigned char tap[MAX_TAP];
	unsigned char psize;
	unsigned char np;
	unsigned char ksize;
};

struct cipher_testvec {
	char *key;
	char *iv;
	char *input;
	char *result;
	unsigned char tap[MAX_TAP];
	int np;
	unsigned char fail;
	unsigned char wk; /* weak key flag */
	unsigned char klen;
	unsigned short ilen;
	unsigned short rlen;
};

struct aead_testvec {
	char *key;
	char *iv;
	char *input;
	char *assoc;
	char *result;
	unsigned char tap[MAX_TAP];
	unsigned char atap[MAX_TAP];
	int np;
	int anp;
	unsigned char fail;
	unsigned char wk; /* weak key flag */
	unsigned char klen;
	unsigned short ilen;
	unsigned short alen;
	unsigned short rlen;
};

struct hash_speed {
	unsigned int blen;	/* buffer length */
	unsigned int plen;	/* per-update length */
};

static char zeroed_string[48];

/*
 * MD4 test vectors from RFC1320
 */
#define MD4_TEST_VECTORS	7

static struct hash_testvec md4_tv_template [] = {
	{
		.plaintext = "",
		.digest	= "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
			  "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
	}, {
		.plaintext = "a",
		.psize	= 1,
		.digest	= "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
			  "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
			  "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
	}, {
		.plaintext = "message digest",
		.psize	= 14,
		.digest	= "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
			"\x18\x87\x48\x06\xe1\xc7\x01\x4b",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyz",
		.psize	= 26,
		.digest	= "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
			  "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
		.np	= 2,
		.tap	= { 13, 13 },
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
		.psize	= 62,
		.digest	= "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
			  "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
	}, {
		.plaintext = "123456789012345678901234567890123456789012345678901234567890123"
			   "45678901234567890",
		.psize	= 80,
		.digest	= "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
			  "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
	},
};

/*
 * MD5 test vectors from RFC1321
 */
#define MD5_TEST_VECTORS	7

static struct hash_testvec md5_tv_template[] = {
	{
		.digest	= "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
			  "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
	}, {
		.plaintext = "a",
		.psize	= 1,
		.digest	= "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
			  "\x31\xc3\x99\xe2\x69\x77\x26\x61",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
			  "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
	}, {
		.plaintext = "message digest",
		.psize	= 14,
		.digest	= "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
			  "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyz",
		.psize	= 26,
		.digest	= "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
			  "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
		.np	= 2,
		.tap	= {13, 13}
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
		.psize	= 62,
		.digest	= "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
			  "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
	}, {
		.plaintext = "12345678901234567890123456789012345678901234567890123456789012"
			   "345678901234567890",
		.psize	= 80,
		.digest	= "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
			  "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
	}
};

/*
 * SHA1 test vectors  from from FIPS PUB 180-1
 */
#define SHA1_TEST_VECTORS	2

static struct hash_testvec sha1_tv_template[] = {
	{
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
			  "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
		.psize	= 56,
		.digest	= "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
			  "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
		.np	= 2,
		.tap	= { 28, 28 }
	}
};


/*
 * SHA224 test vectors from from FIPS PUB 180-2
 */
#define SHA224_TEST_VECTORS     2

static struct hash_testvec sha224_tv_template[] = {
	{
		.plaintext = "abc",
		.psize  = 3,
		.digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
			  "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
			  "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
			  "\xE3\x6C\x9D\xA7",
	}, {
		.plaintext =
		"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
		.psize  = 56,
		.digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
			  "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
			  "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
			  "\x52\x52\x25\x25",
		.np     = 2,
		.tap    = { 28, 28 }
	}
};

/*
 * SHA256 test vectors from from NIST
 */
#define SHA256_TEST_VECTORS	2

static struct hash_testvec sha256_tv_template[] = {
	{
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
			  "\x41\x41\x40\xde\x5d\xae\x22\x23"
			  "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
			  "\xb4\x10\xff\x61\xf2\x00\x15\xad",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
		.psize	= 56,
		.digest	= "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
			  "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
			  "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
			  "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
		.np	= 2,
		.tap	= { 28, 28 }
	},
};

/*
 * SHA384 test vectors from from NIST and kerneli
 */
#define SHA384_TEST_VECTORS	4

static struct hash_testvec sha384_tv_template[] = {
	{
		.plaintext= "abc",
		.psize	= 3,
		.digest	= "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
			  "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
			  "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
			  "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
			  "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
			  "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
		.psize	= 56,
		.digest	= "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
			  "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
			  "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
			  "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
			  "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
			  "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
	}, {
		.plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
			   "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
		.psize	= 112,
		.digest	= "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
			  "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
			  "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
			  "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
			  "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
			  "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
			   "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
		.psize	= 104,
		.digest	= "\x3d\x20\x89\x73\xab\x35\x08\xdb"
			  "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
			  "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
			  "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
			  "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
			  "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
		.np	= 4,
		.tap	= { 26, 26, 26, 26 }
	},
};

/*
 * SHA512 test vectors from from NIST and kerneli
 */
#define SHA512_TEST_VECTORS	4

static struct hash_testvec sha512_tv_template[] = {
	{
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
			  "\xcc\x41\x73\x49\xae\x20\x41\x31"
			  "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
			  "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
			  "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
			  "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
			  "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
			  "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
		.psize	= 56,
		.digest	= "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
			  "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
			  "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
			  "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
			  "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
			  "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
			  "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
			  "\x54\xec\x63\x12\x38\xca\x34\x45",
	}, {
		.plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
			   "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
		.psize	= 112,
		.digest	= "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
			  "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
			  "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
			  "\x72\x99\xae\xad\xb6\x88\x90\x18"
			  "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
			  "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
			  "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
			  "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
			   "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
		.psize	= 104,
		.digest	= "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
			  "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
			  "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
			  "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
			  "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
			  "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
			  "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
			  "\xed\xb4\x19\x87\x23\x28\x50\xc9",
		.np	= 4,
		.tap	= { 26, 26, 26, 26 }
	},
};


/*
 * WHIRLPOOL test vectors from Whirlpool package
 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
 * submission
 */
#define WP512_TEST_VECTORS	8

static struct hash_testvec wp512_tv_template[] = {
	{
		.plaintext = "",
		.psize	= 0,
		.digest	= "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
			  "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
			  "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
			  "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
			  "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
			  "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
			  "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
			  "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",


	}, {
		.plaintext = "a",
		.psize	= 1,
		.digest	= "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
			  "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
			  "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
			  "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
			  "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
			  "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
			  "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
			  "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
			  "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
			  "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
			  "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
			  "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
			  "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
			  "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
			  "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
	}, {
		.plaintext = "message digest",
		.psize	= 14,
		.digest	= "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
			  "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
			  "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
			  "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
			  "\x84\x21\x55\x76\x59\xEF\x55\xC1"
			  "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
			  "\x92\xED\x92\x00\x52\x83\x8F\x33"
			  "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyz",
		.psize	= 26,
		.digest	= "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
			  "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
			  "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
			  "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
			  "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
			  "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
			  "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
			  "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
			   "abcdefghijklmnopqrstuvwxyz0123456789",
		.psize	= 62,
		.digest	= "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
			  "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
			  "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
			  "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
			  "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
			  "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
			  "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
			  "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
	}, {
		.plaintext = "1234567890123456789012345678901234567890"
			   "1234567890123456789012345678901234567890",
		.psize	= 80,
		.digest	= "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
			  "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
			  "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
			  "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
			  "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
			  "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
			  "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
			  "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijk",
		.psize	= 32,
		.digest	= "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
			  "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
			  "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
			  "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
			  "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
			  "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
			  "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
			  "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
	},
};

#define WP384_TEST_VECTORS	8

static struct hash_testvec wp384_tv_template[] = {
	{
		.plaintext = "",
		.psize	= 0,
		.digest	= "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
			  "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
			  "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
			  "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
			  "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
			  "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",


	}, {
		.plaintext = "a",
		.psize	= 1,
		.digest	= "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
			  "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
			  "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
			  "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
			  "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
			  "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
			  "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
			  "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
			  "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
			  "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
			  "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
	}, {
		.plaintext = "message digest",
		.psize	= 14,
		.digest	= "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
			  "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
			  "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
			  "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
			  "\x84\x21\x55\x76\x59\xEF\x55\xC1"
			  "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyz",
		.psize	= 26,
		.digest	= "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
			  "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
			  "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
			  "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
			  "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
			  "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
			   "abcdefghijklmnopqrstuvwxyz0123456789",
		.psize	= 62,
		.digest	= "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
			  "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
			  "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
			  "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
			  "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
			  "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
	}, {
		.plaintext = "1234567890123456789012345678901234567890"
			   "1234567890123456789012345678901234567890",
		.psize	= 80,
		.digest	= "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
			  "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
			  "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
			  "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
			  "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
			  "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijk",
		.psize	= 32,
		.digest	= "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
			  "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
			  "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
			  "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
			  "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
			  "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
	},
};

#define WP256_TEST_VECTORS	8

static struct hash_testvec wp256_tv_template[] = {
	{
		.plaintext = "",
		.psize	= 0,
		.digest	= "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
			  "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
			  "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
			  "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",


	}, {
		.plaintext = "a",
		.psize	= 1,
		.digest	= "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
			  "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
			  "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
			  "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest	= "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
			  "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
			  "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
			  "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
	}, {
		.plaintext = "message digest",
		.psize	= 14,
		.digest	= "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
			  "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
			  "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
			  "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
	}, {
		.plaintext = "abcdefghijklmnopqrstuvwxyz",
		.psize	= 26,
		.digest	= "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
			  "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
			  "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
			  "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
			   "abcdefghijklmnopqrstuvwxyz0123456789",
		.psize	= 62,
		.digest	= "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
			  "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
			  "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
			  "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
	}, {
		.plaintext = "1234567890123456789012345678901234567890"
			   "1234567890123456789012345678901234567890",
		.psize	= 80,
		.digest	= "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
			  "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
			  "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
			  "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
	}, {
		.plaintext = "abcdbcdecdefdefgefghfghighijhijk",
		.psize	= 32,
		.digest	= "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
			  "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
			  "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
			  "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
	},
};

/*
 * TIGER test vectors from Tiger website
 */
#define TGR192_TEST_VECTORS	6

static struct hash_testvec tgr192_tv_template[] = {
	{
		.plaintext = "",
		.psize	= 0,
		.digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
			  "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
			  "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
	}, {
		.plaintext = "abc",
		.psize	= 3,
		.digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
			  "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
			  "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
	}, {
		.plaintext = "Tiger",
		.psize	= 5,
		.digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
			  "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
			  "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
	}, {
		.plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",