linux - Kernel Modul and SSL -


at moment working on kernel module of ccn-lite (http://www.ccn-lite.net/). need security functionality (sha1 , public/private key authentificaton). user-space use openssl library, cannot use library in kernel module.

it hard pick functions out of openssl , add them kernel module, because of them have dependencies libc.

is there any security function in linux kernel, use?

edit: can compute hash function of data received on ethernet:

struct scatterlist sg[1]; struct crypto_hash *tfm; struct hash_desc desc;  tfm = crypto_alloc_hash("sha1", 0, crypto_alg_async);  desc.tfm = tfm; desc.flags = 0;  crypto_hash_init(&desc); sg_init_table(sg, array_size(sg)); sg_set_buf(&sg[0], input, length);  crypto_hash_digest(&desc, sg, length, md);  crypto_free_hash(tfm); 

and want verify signature field of data using function digsig_verify.

verified = digsig_verify(keyring, sig, sig_len, md, md_len); 

as far can see, second parameter signature, third len of signature, forth hash of data , last length of hash.

the first field has type "struct key", , should contain publickey, needed verify signature?

how can initialize parameter i.e. how can systems public key? there way sign char* in linux kernel?

the linux kernel comes bunch of crypto functions.

see: http://lxr.linux.no/#linux+v3.11/documentation/crypto/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -