Security

signing and checking almost implemented