-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I've had a busy two weeks. Last week I was moving so I didn't get a
chance to send out an update. I submitted a pull request for upgrading
Freenet to BC150 but after a long discussion, I ended up closing it
and changing a few things in CryptBucket. I have since made another
simpler and cleaner pull request that simply allows us to upgrade to
BC150 right away without trying to add support for the new OCB nonce
length that we aren’t using yet.

While implementing JFK message 3 in KeyExchange, I realized that I
also needed a class for encrypting and decrypting byte[]s. After some
discussion on irc with nextgens and others I created the CryptBitSet
class. This can use either BitSets or byte[]s. The advantage of
BitSets is that they make boolean arithmetic much cleaner looking. I
ended up removing AES/CTR, Rijndael ECB and PCFB from CryptBucket and
put them into CryptBitSet. I also added support for ChaCha. After
talking with toad about the current use of Rijndael/CTR (just used in
db4o right now), I found another class to create. I need to write a
replacement for EncryptingIoAdapter. It will be extend
RandomAccessThing rather than IoAdapter. In terms of crypt it will
using the version of ChaCha in BouncyCastle v1.51. This enables ChaCha
to act like a block cipher in CTR mode. I'm anticipating BC151 will be
released as stable relatively soon since they just released the last
beta before stable.

CryptSignature can now accept just a public key rather than a key pair
and only verify things, not sign. Added a KeyType and KeyPairType
class to make key generation and length easier to keep track of. Also
reduces code reuse. Created KeyUtils for generating key pairs and keys
as well as converting from byte[]s to KeyPair or SecretKey.

I broke JFK out of KeyExchange and into it's own class structure to
help prevent against DOS atacks as per nextgens suggestion. Now there
is the abstract class JFKExchange that has all the variables and
methods that both the Initiator and Receiver share. There are two
subclasses, JFKInitiator and JFKReceiver, that only have the
constructors and message gen and processing that they need. I have
also written support for all 4 messages. Some things are hard to pull
out of FNPPacketMangler because of package scope issues. In message 4
I'm just decrypting everything and sending it back because most of the
work there is reading the decrypted bytes into the right variables in
PeerNode, FNPPacketMangler and such. I'd like to try an move more
things into my JFK classes, but so far I haven't seen any good and
sensible way to do that.

I've gone through and improved the exception handling and logging of
all the classes I wrote. I figured out what exceptions the user needed
to know about and should have to handle vs what should be caught and
logged. Logging is only being done to Logger.error, not to anything
else. I did leave some of the logging in that carried over from some
of the old code.

I have also created an UnsupportedTypeException. This lets me check
what kind type a class was instantiated with and if that method only
works with a different type it will throw an error. For example in
CryptSignature some methods only work with ECDSA and others only work
with DSA. Now those methods throw an UnsupportedTypeException if the
incorrect type is used with each method.

I am about 1/4 of the way through documenting the API. Right now I'm
documenting every method even if it seems self explanatory. I should
have that done in the next week. This week I will start writing unit
tests. I haven't written unit tests before, so hopefully I won't run
into too much trouble there. I'm hoping to have enough done to start
merging parts of the API in in a week or two.

- -Charles
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTuXlzAAoJEKzPTx3Y+gGrGRMP/0U8lnfjQdzYFTrMNzehOImd
YbEkWVTvOFRczh9J/M9Yfurd0E4+dV++2WaKPD4eZ8N6RMcDc34tDfBFMMJZbuA9
Azj11h5wTbhkJnrFtIMxo91ukLO9iCaIHTQbDnBLJ8Cn1dUgtUdmpa0Go5sixrXj
KBRQaqpoTt2X94p4wK0QjhxmjI3yw/R0iuE9TyNXKsL7ngKFNAzpvkT6/OAIUnud
GLdhOO1c7cW5Q9Vw0ynxW/P0kbEmbceoFcTRJP3UjrR/GMiC4FdIHKzzoifzoEp9
iuf9gLPRnXKqa5FvG/Qz1dIxLRpidkOBdUgAsJh8N0mChuof7QZierWZc+5E7Q+f
e1w80x2ysSH2118FpMsV9rmF6pyjL4ZDfTCCN8ggL47fDVrwx9z8LiF6Kgdg+xC8
eRkBjduP+LqcnM+MTKBtHvl2au/rEV0JiioR6/kJAxBmmJtl+Mo1Nmj59j9DN9px
fbLaSFApVhCINZByfbfg9GvrDI+LFC3HkQo8s18Y6Rm13eNKYf8fJwMiq48vuUD/
V3nY22nwme4VirDrDQcJEqYzh3mRYoWrlh46HT7vdHlhxf9G0kFrdfH2y8/bhD5x
NT9zg9LoPGuTwsmRfsxyyo7jdMjtZbgarJPeQEytRfswYvSNkEZ9idBNLbZSnURM
LROGOcorh/ih/LQzokRF
=6N42
-----END PGP SIGNATURE-----
_______________________________________________
Devl mailing list
Devl@freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to