crypto implementation for small footprint devices