552
questions
0
votes
1
answer
29
views
Transform crypt() from PHP to Node.js
I'm having a problem converting crypt() from PHP to Node.js
I have a database with the reg_users table where I have columns like username and password.
In PHP, it's very simple to encrypt the password ...
1
vote
1
answer
57
views
replacement for python3 crypt module
The documentation for the python3 crypt module says.
Deprecated since version 3.11, will be removed in version 3.13: The crypt module is deprecated (see PEP 594 for details and alternatives). The ...
5
votes
1
answer
38
views
Save this Data: Replicate crypt() behavior with bad salt prior to PHP 8.1.16
Problem:
On PHP 8.1.16, the behavior of crypt() changed so that if it is called with certain CRYPT_BLOWFISH incompatible salts, it returns *0 instead of a hashed value. If we upgrade our systems to 8....
0
votes
1
answer
68
views
Issue with Crypt Facades on user email in forgot password feature Laravel 11 Breeze Package
I'm using Laravel 11 with the Breeze package for authentication. In my application, I've encrypted user data like email and name using the Crypt Facades.
The registration process works as expected. ...
2
votes
0
answers
54
views
PHP crypt returns *0 in different PHP version
I used crypt() for password on my site and I just noticed the code in server with php 5.6.40 it's fine but in 8.2.12 it returns *0
I noticed if I change the ! to something else then it works but I ...
-1
votes
1
answer
53
views
yescrypt && memory usage
We're using yescrypt from libc's crypt(3) function to encrypt and check credentials in our C-written application server. Sometimes the crypt(3) fails because the application gets SIGKILL from the ...
0
votes
2
answers
213
views
How to read an output of filezilla-server-crypt command with a cmd/batch script?
in order to migrate an FTP database to an SFTP database, I need to create a script that modifies a xml file.
For the user, I need to encrypt the password.
I've found that a file called filezilla-...
1
vote
1
answer
71
views
How to check php.ini / php settings about crypting (BLOWFISH)
My websites's user login function suddenly stopped working on a rented server( web hosting service) ( It worked wonderfully before for YEARS.) Because I didn't changed anything, the database is also ...
0
votes
1
answer
101
views
Can a salt value passed to crypt() contain a $ symbol?
Started learning about linux security and reading some articles about MD5 password hashing.
This godbolt demo uses the crypt function
char *crypt(const char *key, const char *salt);
and passes this ...
1
vote
1
answer
1k
views
Using useradd with --password to create new users, but the encrypted password being passed in is not stored correctly in /etc/shadow
I have a C++ program which adds new users to a Linux system by calling useradd.
This includes setting the password by using the --password option and passing in the encrypted (not plain text) password....
0
votes
0
answers
106
views
Getting [ModuleNotFoundError: No module named 'passlib'] this even passlib is already installed
cjson not found, falling back to stdlib json
Traceback (most recent call last):
.
.
from Crypto.Hash import HMAC, SHA256, SHA384, SHA512
ModuleNotFoundError: No module named 'Crypto
also,
from passlib....
1
vote
2
answers
297
views
MD5-based password algorithm in Python
I try to call API that specifically uses MD5 hash in one of the steps. In the documentation they specifically show example reference that generates MD5 in the following way
$ openssl passwd -1 -salt ...
0
votes
0
answers
123
views
Save crypted user email in database and use it for login in NodeJS
Is it have any possible option to encrypt user email in nodejs (for security issue) and save it crypted in database(postgress). After that i use email for login and need to find user email in db. I ...
1
vote
0
answers
112
views
How do I use the crypt function in a where in a laravel query?
I need to use the crypt function in a query in laravel. It is a system of saving passwords, and the user and password are encrypted by Crypt::encrypt, I would like to know if it is possible to decrypt ...
0
votes
1
answer
1k
views
Crypt_RSA phpseclib3 PHP 8 Issue
As the title says:
We have recently upgraded to PHP 8 however, Crypt/RSA.php is deprecated and will not be supported in PHP 8 anymore, so we are forced to find another solution.
I heard that ...
0
votes
1
answer
124
views
why does php crypt function with hash return hash
I recently inherited a legacy php project that rolled it's own auth using the crypt function. I'm working on reverse engineering it but don't quite understand how this works.
the code to save this ...
1
vote
1
answer
617
views
How to translate hashing with 'openssl passwd -1 -salt $salt $data' to node.js
I am trying to imitate the behaviour of openssl passwd -1 -salt k7Ko8SgF di6cqUaQBuUOd7WhURXDq04022 in nodejs.
The result of this operation is $1$k7Ko8SgF$CN8PPKddtp5gONSRp4B56/ and I know the hash is ...
0
votes
1
answer
2k
views
Snappy Mail/Rainloop Authentication failed
I Installed the fresh cyberpanel installation when I created a email with the domain and tried to login with the same it shows
Authentication failed
Server message: AUTHENTICATIONFAILED ...
0
votes
1
answer
149
views
Oracle PL/SQL produce the same hash as PERL crypt
My company is in the middle of migrating their old application (perl) into their new application (oracle apex). We currently have all of our internal processes up and running on oracle apex, while all ...
1
vote
1
answer
689
views
The crypt module is not supported on Windows
from crypt import methods
from distutils.log import debug
from flask import Flask, render_template, request, url_for, redirect
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
...
-1
votes
1
answer
215
views
Private key does not satisfy the curve requirements (ie. it is invalid);
Can Anyone help me, please? It gives me the error "throw new Error('Private key does not satisfy the curve requirements (i.e., it is invalid)');" it's been 5 days of debugging the code but ...
0
votes
1
answer
458
views
Laravel 405 Method Not Allowed For Delete Request
I make a CRUD for the country entity when I try to delete a specific element by id without encrypted cipher text. It was deleted correctly.
Axios Request
<script>
function ...
-1
votes
1
answer
606
views
Encryption JavaScript to-from C++ and QT
Yes, there is 100 topics about it. Yes, most of them are snippets/parts of code that answer the specific problem and don't actually help.
So perhaps this topic would help provide a "complete"...
1
vote
1
answer
54
views
crypt(param_1,local_88) function in C Secure?
Security scan tool reported C's crypt(param_1,local_88) as dangerous function. Searching in google couldn't find any solid information on crypt except someone mentioned it uses DES which is 64 bit (...
0
votes
2
answers
841
views
create a new column with passwords using crypt
I am currently trying to create a new column with passwords based on other column from the same table (tb_customer).
The source to create the passwords is the column cust_cif.
The script I used is as ...
1
vote
1
answer
101
views
Javascript implementation of sha256_crypt
I am looking to create/use a javascript implementation of passlib.hash.sha256_crypt where I can specify a salt and password and receive a hash that is in the $5${salt}${checksum} format. However all ...
0
votes
0
answers
1k
views
Nodejs encrypt and decrypt using crypto decrypt badly only firsts characters
I have a js script that crypt and decrypt a file using these two functions
Encryption
function encryptFile(fileName) {
const input = fs.createReadStream(fileName);
const output = fs....
1
vote
1
answer
4k
views
ModuleNotFoundError: No module named '_crypt'
I'm trying to use Flask and started with first example, while running the below code
from crypt import methods
from flask import Flask
app = Flask(__name__)
@app.route('/', methods=['GET'])
def ...
0
votes
0
answers
41
views
I'm using Caesar crypt and I'm able to encrypt my code but am not sure on how I'd decrypt it
I'm using Caesar crypt to encrypt a string sentence and I'm able to encrypt my code but am not sure on how I'd decrypt it. I have my shift pattern set and am able to print to my screen, but like I ...
0
votes
2
answers
4k
views
Convert bytes to string or store as bytes python
I'm trying to encrypt string with python by RSA but the encrypted string returns as bytes
I'm trying to find a way either to convert bytes to string and store it in db or store it as bytes as it is ...
1
vote
0
answers
159
views
Wrong AES key length using Crypt::JWT
I'm attempting to generate a JWE with (5 parts) using Crypt::JWT. It's my first foray into perl.
Following the example from the documentation:
use Crypt::JWT qw(encode_jwt);
my $claims = {
iss =>...
1
vote
1
answer
506
views
How to use crypt_gensalt() in crypt.h
According to crypt.h:
extern char *crypt_gensalt (const char *__prefix, unsigned long __count,
const char *__rbytes, int __nrbytes)
I understand that __prefix is ...
0
votes
1
answer
203
views
Is there any function or package to generate md5crypt string in Oracle?
We'd like to encrypt user password in exported file from Oracle, password should be md5crypt string, like $1$salt$hash.
--PowerShell Git function example:
Get-Md5Crypt('sachiko')
$1$gfJ1cxju47$...
0
votes
3
answers
551
views
Why am I getting only 800 hashes per second?
I was trying to crack a 6 character long password, but even after 10 minutes, it showed no progress. So, i decided to find how many hashes am I finding per second.
The following code need to crack the ...
0
votes
0
answers
201
views
Diffie-Hellman algorithm between java and Node.js
I'm trying to simulate java Diffie Hellman codes in Node.JS
in java code I have 'key' and 'prime'
but I'm don't know how to use this values in Node.js code
Java :
private static byte[] ...
0
votes
2
answers
722
views
swift Generate shared key using ECDH
I am trying to encrypt a message to the server.
To do this, I generate a public and private key.
I send my public key to the server and receive its public key from it.
func generatePair() {
if let ...
-1
votes
1
answer
299
views
Blowfish support in crypt python library
I tried to crypt a password using a blowfish hashing algorithm by:
c_word = crypt.crypt(password, insalt)
Actually, insalt including the next format: $hashing_algo$salt$.
For example: here the ...
0
votes
1
answer
95
views
Not Rehashing Properly
We have a PHP class that reads the database on user credentials, rehash SHA1 => BCrypt as needed. Works great, however these days we are developing a WinForms app, and using Chilkat BCrypt assembly ...
0
votes
1
answer
1k
views
is it possible to retrieve the IvParameterSpec from the code (JAVA)?
I have a code:
byte[] var1 = e.getBytes("UTF-8");
SecretKeyFactory var2 = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
PBEKeySpec var3 = ...
0
votes
1
answer
400
views
protect existing sqlite database with sqlite-jdbc-crypt throws sqlite error or missing database (unsupported file format)
I have an already existing database that I want to protect using sqlite-jdbc-crypt driver. The code I am using is as under. I tried to accomplish the task in three different ways as marked by action = ...
2
votes
1
answer
1k
views
Go RSA decrypt using public key implementation from java
Provider has this sample JAVA code to decrypt RSA using public key.
public static byte[] decryptByPublicKey(byte[] encryptedData, String publicKey)
throws Exception {
byte[] ...
1
vote
1
answer
181
views
Question about Crypt::OpenSSL::RSA->verify method
My question is about this:
https://metacpan.org/pod/Crypt::OpenSSL::RSA
If there described method verify() fails, I do error handling like this:
my $rsa_pub = Crypt::OpenSSL::RSA->new_public_key($...
0
votes
1
answer
39
views
crypt algorithm by a vectored key and the error is Proportional to the difference between input key and real key
I want to find an crypt algorithm which provides the functionality described below.
Given a key (a vector Vkey) and a data (an image), use this key to encry the image; the encrypted image can not be ...
0
votes
0
answers
116
views
AES MODE_CFB decoding result is different
python code
from Cryptodome.Cipher import AES as domeAES
def __init__(self, key):
self.key = hashlib.sha256(key.encode()).digest()
self.block_size = cryptoAES....
0
votes
0
answers
233
views
crypt() returns null using a salt with a `+`
Why does crypt have a problem with + in the salt as of CentOS 8??
CentOS 7:
Start by creating a salt on a CentOS 7 machine:
[root@localhost map]# /usr/bin/head -c18 /dev/urandom | /usr/bin/openssl ...
2
votes
1
answer
588
views
crypt.crypt raises an OSError: Invalid Argument
I use an up to date Debian 10. I have unexpected behavior with python crypt.crypt, some calls raise an OSError: Invalid Argument exception, without further explanation, so I am not really sure what is ...
0
votes
0
answers
388
views
Eloquent query for encrypted fields
I am saving clients in my database and I am getting their invoices through their identity document. The document is encrypted and this client MAY EXIST SEVERAL TIMES in the database (since this client ...
0
votes
1
answer
112
views
Is there any way to set members of opaque structs in openssl v1.1.0 or greater?
I am restructuring a legacy code to be compatiable with OpenSSL 1.1.1, During the upgrade of OpenSSL from 1.0.2 -> 1.1.1, serveral structs were made opaque and direct member access is no longer ...
-2
votes
1
answer
988
views
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined function App\needsRehash()
I am working on an old laravel project,
when I launch the project everything goes well but when I try to add a user (name, first name, password ..) the error appears.
i am using wamp. i used xampp too ...
1
vote
1
answer
2k
views
Laravel encrypt password before storing on DB and decrypt it to use on email settings
I followed this tutorial to create dynamic email settings stored on db.
https://kayike.medium.com/enable-unique-and-dynamic-smtp-mail-settings-for-each-user-laravel-48e320d381ec
The only problem is ...