Function getKeyBlock