Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] chacha20 easy use supports #2

Closed
vay3t opened this issue Jul 16, 2023 · 2 comments
Closed

[Feature Request] chacha20 easy use supports #2

vay3t opened this issue Jul 16, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@vay3t
Copy link

vay3t commented Jul 16, 2023

Describe the bug
using modern ciphers makes detection in some antivirus more difficult, one of them is the general use of chacha20, maybe it is useful to have the ease of use like in this project https://github.com/alinz/crypto.go but to the library you are programming.

@D3Ext
Copy link
Owner

D3Ext commented Jul 17, 2023

Thank you for your idea. I'll try to implement it as soon as possible.

@D3Ext
Copy link
Owner

D3Ext commented Jul 21, 2023

Hi!

I've added ChaCha20 encrypt and decrypt function like in https://github.com/alinz/crypto.go. Let me know if it works for you

This is an example:

package main

import (
  "fmt"
  "log"
  "github.com/D3Ext/maldev/crypto"
)

func main(){
  data := []byte("this is an example")
  psk := []byte("ThisIsMySuperSecret32Password123")

  fmt.Println("Data:", string(data))
  fmt.Println("Key:", psk)

  ciphertext, err := crypto.Chacha20Encrypt(data, psk) // Encrypt
  if err != nil {
    log.Fatal(err)
  }

  fmt.Println("Ciphertext:", ciphertext)

  decoded, err := crypto.Chacha20Decrypt(ciphertext, psk) // Decrypt
  if err != nil {
    log.Fatal(err)
  }

  fmt.Println("Decoded:", string(decoded))
}

Tell me more modern ciphers and I'll add them

@D3Ext D3Ext closed this as completed Jul 23, 2023
@D3Ext D3Ext added enhancement New feature or request good first issue Good for newcomers labels Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants