Talitos input data format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everybody,

according to the function call in drivers/crypto/talitos.c (Linux version
2.6.29) in function ipsec_esp():

/*hmac data*/
map_single_talitos_ptr(dev, &desc->ptr[1], sg_virt(areq->src) -
sg_virt(areq->assoc), sg_virt(areq->assoc), 0, DMA_TO_DEVICE);

if initialization vector (IV) should be included for HMAC computation, it
must be in the memory after the associated data (ASSOC) and after ASSOC and
IV the areq->src data must follow. Thus in memory it should look like: 
+---------+------+-------------------------+
|  ASSOC  |  IV  | DATA to encrypt/decrypt |
+---------+------+-------------------------+

Is my assumption right? Well my code is working but I want to ask you if it
is really a requirement that is hopefully somewhere specified. Where could I
find such information? My searching in Documentation dir and Google was
without success.  

Also, how does it work when I do not want to use ASSOC but still the IV
should be included in HMAC computation? Is it then intended that the pointer
areq->assoc points on the IV? Or am I not in the right ballpark?

Thanks a lot for your answer!

Ondrej


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux