return 0;
 }
 
-static int dh_set_secret(struct crypto_kpp *tfm, void *buf, unsigned int len)
+static int dh_set_secret(struct crypto_kpp *tfm, const void *buf,
+                        unsigned int len)
 {
        struct dh_ctx *ctx = dh_get_ctx(tfm);
        struct dh params;
 
        }
 }
 
-static int ecdh_set_secret(struct crypto_kpp *tfm, void *buf, unsigned int len)
+static int ecdh_set_secret(struct crypto_kpp *tfm, const void *buf,
+                          unsigned int len)
 {
        struct ecdh_ctx *ctx = ecdh_get_ctx(tfm);
        struct ecdh params;
 
        ctx->g2 = false;
 }
 
-static int qat_dh_set_secret(struct crypto_kpp *tfm, void *buf,
+static int qat_dh_set_secret(struct crypto_kpp *tfm, const void *buf,
                             unsigned int len)
 {
        struct qat_dh_ctx *ctx = kpp_tfm_ctx(tfm);
 
  * @base:              Common crypto API algorithm data structure
  */
 struct kpp_alg {
-       int (*set_secret)(struct crypto_kpp *tfm, void *buffer,
+       int (*set_secret)(struct crypto_kpp *tfm, const void *buffer,
                          unsigned int len);
        int (*generate_public_key)(struct kpp_request *req);
        int (*compute_shared_secret)(struct kpp_request *req);
  *
  * Return: zero on success; error code in case of error
  */
-static inline int crypto_kpp_set_secret(struct crypto_kpp *tfm, void *buffer,
-                                       unsigned int len)
+static inline int crypto_kpp_set_secret(struct crypto_kpp *tfm,
+                                       const void *buffer, unsigned int len)
 {
        struct kpp_alg *alg = crypto_kpp_alg(tfm);