minor fixes: random iv creation, create pubkey pkt for seckey pkt