Scala implementation of RFC6570