A Novel Model-Based Security Scheme for LoRa Key Generation