Refactor for keybase/go-libkb#61