Error installing pgcrypto extension
As dezso said in the comment, the problem was that CREATE can't be part of a subquery. And phpPgAdmin transform the query before executing it so it had put the CREATE as a subquery.

So the solution was to execute the CREATE query in PgAdmin for example.