For points on an elliptic curve over the base field,
element_from_hash() will
truncate the input hash until it can represent an
x-coordinate in that field. (PBC then computes a
corresponding y-coordinate.) Ideally the hash length
should be smaller than size of the base field and also
the size of the elliptic curve group.
Hashing to elements in field extensions does not take advantage of the fact that the extension has more elements than the base field. I intend to rewrite the code so that for a degree n extension code, PBC splits the hash into n parts and determine each polynomial coefficient from one ofthe pieces. At the moment every coefficient is the same and depends on the whole hash.
This is harmless for the base field, because all the pairing types implemented so far use an integer mod ring as the base field, rather than an extension of some low characteristic field.