Add KeyInterface and KeyImpl for sample apps