(if no, why not? :) )
No, CFB128 mode is not implemented. You can only use
AES in ECB or CBC mode.
Nobody asked for CFB mode support before. Why would you
like to use the CFB mode?
To use AES with say CBC mode, I believe you need to
start with PK11_CreateContextBySymKey, using the CKM_AES_CBC
or CKM_AES_CBC_PAD mechanism type. Follow that by PK11_CipherOp
calls, and end with a PK11_DestroyContext call. You can click
the link below for some sample code.
http://lxr.mozilla.org/security/ident?i=PK11_CreateContextBySymKey
Wan-Teh
Because that's what the current (non-NSS) code does. I'd rather just
port, not change, the code.
... Allan
Is the CFB mode used in your implementation of some standard?
Just curious.
The crypto support in NSS has been primarily driven by the needs
of the higher-level NSS libraries in -- libnss3.so (certs, etc.),
libssl3.so, and libsmime3.so. Since SSL/TLS and S/MIME don't
need the CFB mode for block ciphers, we didn't implement it.
This is also why we haven't implement RSA PSS and RSA OAEP.
But people have started to use NSS only for crypto, so we
may need to start to invest more in this area. I'd still like
to know what (protocol, standard, or proprietary system) you're
using the CFB mode for.
Wan-Teh
No, it is not a standard.
But it is used by SNMP
http://www.rfc-archive.org/getrfc.php?rfc=3826
>>>>> Why would you like to use the CFB mode?
>>>> Because that's what the current (non-NSS) code does. I'd rather just
>>>> port, not change, the code.
>>> Is the CFB mode used in your implementation of some standard?
>>> Just curious.
>> No, it is not a standard.
> But it is used by SNMP
> http://www.rfc-archive.org/getrfc.php?rfc=3826
Well, that's close enough to "standard" for our purposes.
NSS doesn't implement SNMP, but if an SNMP implementation wants to use
NSS's softoken, perhaps NSS's softoken ought to implement it.
It would mean implementing a new set of PKCS#11 "mechanisms", IINM.
--
Nelson B
The NIST AES validation list is a good way to find out which
crypto modules support AES in CFB128 mode:
http://csrc.nist.gov/cryptval/aes/aesval.html
Wan-Teh
I've not ventured into NSS before, but I'll look at it.
--
... Allan
It has been running fine for me for a while btw.
I'll try looking into getting properly into NSS, but it's not on the
top of my list.
https://bugzilla.mozilla.org/show_bug.cgi?id=358219
Allan, did you mean you built the CFB128 mode yourself
using the ECB mode as a primitive, as I suggested?
Wan-Teh