Generating and encrypting dsa