* tcrypt.ko module usage
@ 2015-03-08 9:02 sri sowj
2015-03-08 10:24 ` Stephan Mueller
0 siblings, 1 reply; 3+ messages in thread
From: sri sowj @ 2015-03-08 9:02 UTC (permalink / raw)
To: linux-crypto@vger.kernel.org
HI All,
As I understand tcrypt.ko module purpose is to test different crypto
algorithm from the kenrel space. Please can some one help me with
below queries to understand tcrypt use cases.
#1:If one need to test crypto algorithms with under laying crypto
Hardware engine using tcrypto module ,is there any method or
procedure needs to be followed to hook crypto hardware engine with
tcrypt module?
As per my understanding its very much straight forward,like if i need
to test aes algorithm then it will be some thing like "insmod
tcrypt.ko mode = 10"
#2: Is there any way to test tcrypt module for some scenarios like
2.a:concurrency scenario where multiple processes/threads try
to send a request for same algorithm
2.b:multiple requests with a same tfm object
2.c:back logged message scenarios like multiple methods will be
sent for processing while crypto engine is serving a request from same
tfm object
#3:Is there any significance with
"CONFIG_CRYPTO_MANAGER_DISABLE_TESTS" Flag? ,Because when I disable
this flags I observed that tcrypt module
fails with a message like "Failed to load transform for cbc(aes): -2"
BR,
Srisowj
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: tcrypt.ko module usage
2015-03-08 9:02 tcrypt.ko module usage sri sowj
@ 2015-03-08 10:24 ` Stephan Mueller
2015-03-08 11:03 ` sri sowj
0 siblings, 1 reply; 3+ messages in thread
From: Stephan Mueller @ 2015-03-08 10:24 UTC (permalink / raw)
To: sri sowj; +Cc: linux-crypto@vger.kernel.org
Am Sonntag, 8. März 2015, 14:32:53 schrieb sri sowj:
Hi sri,
> HI All,
>
>
> As I understand tcrypt.ko module purpose is to test different crypto
> algorithm from the kenrel space. Please can some one help me with
> below queries to understand tcrypt use cases.
>
> #1:If one need to test crypto algorithms with under laying crypto
> Hardware engine using tcrypto module ,is there any method or
> procedure needs to be followed to hook crypto hardware engine with
> tcrypt module?
>
> As per my understanding its very much straight forward,like if i need
> to test aes algorithm then it will be some thing like "insmod
> tcrypt.ko mode = 10"
That works if you ensured that your implementation has the highest priority of
all implementations marked with the cipher names listed in case 10 (as per
your example):
case 10:
ret += tcrypt_test("ecb(aes)");
ret += tcrypt_test("cbc(aes)");
ret += tcrypt_test("lrw(aes)");
ret += tcrypt_test("xts(aes)");
ret += tcrypt_test("ctr(aes)");
ret += tcrypt_test("rfc3686(ctr(aes))");
break;
>
> #2: Is there any way to test tcrypt module for some scenarios like
> 2.a:concurrency scenario where multiple processes/threads try
> to send a request for same algorithm
This is not implemented with tcrypt. But you can either expand tcrypt,
implement your own test, test it from user space with the speed test provided
in [1] or use another implementation of the speed test that may easy be
expanded [2].
[1] http://www.chronox.de/libkcapi.html
[2] https://www.eperm.de/cryptoperf.html
> 2.b:multiple requests with a same tfm object
dto
> 2.c:back logged message scenarios like multiple methods will be
> sent for processing while crypto engine is serving a request from same
> tfm object
dto
>
> #3:Is there any significance with
> "CONFIG_CRYPTO_MANAGER_DISABLE_TESTS" Flag? ,Because when I disable
> this flags I observed that tcrypt module
> fails with a message like "Failed to load transform for cbc(aes): -2"
This flag relates to the testmgr.c which implements known answer tests
executed at the time a cipher implementation is registered.
>
>
> BR,
> Srisowj
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ciao
Stephan
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: tcrypt.ko module usage
2015-03-08 10:24 ` Stephan Mueller
@ 2015-03-08 11:03 ` sri sowj
0 siblings, 0 replies; 3+ messages in thread
From: sri sowj @ 2015-03-08 11:03 UTC (permalink / raw)
To: Stephan Mueller; +Cc: linux-crypto@vger.kernel.org
HI Stephan,
Thank you very much for the information provided.
It was a great help with quick response, I really appreciate your
efforts and the time.
If possible can you please help me to understand on how to handle
backlog messages from crypto kernel driver?
BR,
Srisowj
On Sun, Mar 8, 2015 at 3:54 PM, Stephan Mueller <smueller@chronox.de> wrote:
> Am Sonntag, 8. März 2015, 14:32:53 schrieb sri sowj:
>
> Hi sri,
>
>> HI All,
>>
>>
>> As I understand tcrypt.ko module purpose is to test different crypto
>> algorithm from the kenrel space. Please can some one help me with
>> below queries to understand tcrypt use cases.
>>
>> #1:If one need to test crypto algorithms with under laying crypto
>> Hardware engine using tcrypto module ,is there any method or
>> procedure needs to be followed to hook crypto hardware engine with
>> tcrypt module?
>>
>> As per my understanding its very much straight forward,like if i need
>> to test aes algorithm then it will be some thing like "insmod
>> tcrypt.ko mode = 10"
>
> That works if you ensured that your implementation has the highest priority of
> all implementations marked with the cipher names listed in case 10 (as per
> your example):
>
> case 10:
> ret += tcrypt_test("ecb(aes)");
> ret += tcrypt_test("cbc(aes)");
> ret += tcrypt_test("lrw(aes)");
> ret += tcrypt_test("xts(aes)");
> ret += tcrypt_test("ctr(aes)");
> ret += tcrypt_test("rfc3686(ctr(aes))");
> break;
>
>>
>> #2: Is there any way to test tcrypt module for some scenarios like
>> 2.a:concurrency scenario where multiple processes/threads try
>> to send a request for same algorithm
>
> This is not implemented with tcrypt. But you can either expand tcrypt,
> implement your own test, test it from user space with the speed test provided
> in [1] or use another implementation of the speed test that may easy be
> expanded [2].
>
> [1] http://www.chronox.de/libkcapi.html
> [2] https://www.eperm.de/cryptoperf.html
>
>> 2.b:multiple requests with a same tfm object
>
> dto
>
>> 2.c:back logged message scenarios like multiple methods will be
>> sent for processing while crypto engine is serving a request from same
>> tfm object
>
> dto
>>
>> #3:Is there any significance with
>> "CONFIG_CRYPTO_MANAGER_DISABLE_TESTS" Flag? ,Because when I disable
>> this flags I observed that tcrypt module
>> fails with a message like "Failed to load transform for cbc(aes): -2"
>
> This flag relates to the testmgr.c which implements known answer tests
> executed at the time a cipher implementation is registered.
>>
>>
>> BR,
>> Srisowj
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> --
> Ciao
> Stephan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-08 11:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-08 9:02 tcrypt.ko module usage sri sowj
2015-03-08 10:24 ` Stephan Mueller
2015-03-08 11:03 ` sri sowj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox