Scratch and indentation hardness of crystals