private boolean loop(AlternativeCompositeByteBuf buf) throws InvalidKeyException, SignatureException, IOException {
MessageContentIndex next;
while ((next = message.contentReferences().peek()) != null) {
final int start = buf.writerIndex();
final Content content = next.content();
switch (content) {
case KEY:
buf.writeBytes(message.key(next.index()).toByteArray());
message.contentReferences().poll();
break;