Efficient storage and verification of data