PHP Classes

php aes ccm mode

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  php aes ccm mode  
Subject:php aes ccm mode
Summary:php aes ccm mode
Messages:3
Author:Jan Altensen
Date:2015-06-28 03:32:30
Update:2015-06-28 04:14:13
 

  1. php aes ccm mode   Reply   Report abuse  
Picture of Jan Altensen Jan Altensen - 2015-06-28 04:14:13
Hello

i have a big problem, i get encrypted data from an api
i have the keys to decrypt it, my problem is that php has no function to decrypt aes with the ccm mode
on javascript you can use the sjcl library https://github.com/bitwiseshiftleft/sjcl

(
// Decrypt data.
var challengev = getCookie('challengev');
var iv = challengev.substr(16, 16);
var adata = challengev.substr(32, 16);

var derivedk = getCookie("derivedk");
var c = new sjcl.cipher.aes(sjcl.codec.hex.toBits(derivedk));

var pt = sjcl.mode.ccm.decrypt(c, sjcl.codec.hex.toBits(data), sjcl.codec.hex.toBits(iv), sjcl.codec.hex.toBits(adata));
pt = sjcl.codec.utf8String.fromBits(pt);
return pt;
)

on php i have no equivalent to decrypt it
(i want read with php some data from my router to create with rrdtool images)

has anyone a solution to derypt it?

Regards,
Stricted

There are 2 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.