Initial verion of the chacha core functionality.