Algorithms For Reconstructing Databases And Cryptographic Secret Keys In Entropic Settings