Computer security is security applied to computing devices such as computers and smartphones, as well as to both private and public computer networks, including the whole Internet.

learn more… | top users | synonyms

0
votes
0answers
25 views

Adds digital signature to outgoing TCP packet

The code connects multiple clients to a server using TCP sockets asynchronously. I have added code to attach a digital signature to the outgoing messages from the server, to authenticate the message ...
2
votes
1answer
38 views

Creating a portable encrypted credential store

There have been a few questions over on SO recently about securely storing credentials in Powershell scripts. Because ConvertFrom-SecureString uses DPAPI it makes ...
2
votes
1answer
60 views

Encrypt and Decrypt

I just want to know if my code can be weak. Can anyone also spot a mistake in my code? Encrypt ...
5
votes
1answer
146 views

Encryption Algorithm in C#

I'm coding a "encryption" algorithm for learning and and don't know how good is it or how could I make it better: ...
-1
votes
1answer
52 views

Improving PHP Security of Login

One of my github issues is below. I am having some problems with my security, is there anything that I should or need to improve. Here is an example of code that I use, but throughout the script there ...
5
votes
0answers
80 views

BouncyCastle implementation with X509Certificate signing, KeyStore generation, and Socket creation

The following is a (somewhat messy) implementation of the BouncyCastle cryptography library. I create a self-signed certificate (hopefully correctly), store it in a Java KeyStore, and use it to create ...
-2
votes
1answer
55 views

Adding tables and values to a database

I am having problems with my code because I am using a system called styleci. Can you please check it? How can I make it better and more secure? ...
2
votes
2answers
75 views

Read and display data from MySQL table

Is there any security threat here? ...
7
votes
2answers
73 views

Simple command-line password generator

I'm very new to Haskell, I've read most of learnyouahaskell.com and played around with some simple things, but this is probably the most 'complicated' bit of Haskell I've written so far. I have an ...
2
votes
1answer
50 views

Validating user access to a function

I was reviewing the following code block and noticed there was validation check at the top. The 3rd line in the function checks if the invoice belongs to the logged in customer. I am wondering ...
3
votes
2answers
70 views

First user login function: Security and efficency opinions

I am writing an application for work. This application will sit on a closed network but I still have to be concerned about security. There will be a maximum of three types of user for this ...
2
votes
0answers
16 views

XSS Sanitization of RSS Feeds using JS

I need to pull an rss feed with links, headlines, and descriptions onto the front page of a website, and while I would like to think the source is trustworthy, you can never rule out malicious actors. ...
3
votes
1answer
184 views

Function to generate a UUID

I am trying to prevent CSRF for my login page (linked from here), and for this I am going to use a random token generator to create a UUID for the session. The function that I have so far is as such: ...
1
vote
1answer
80 views

Secure RSA encryption with PyCrypto

I'm coding a very simple reverse shell in python, and I want to encrypt the communication between the server and the client. The idea is to exchange an AES key using RSA then use it to encrypt ...
8
votes
6answers
1k views

Custom algorithm for hashing and un-hashing password

I am attempting to create functions for getting an algorithm, hashing and un-hashing a string. As it stands, it works, and very well. But, I feel this is not secure enough and someone could easily ...
3
votes
1answer
82 views

Learning with an OOP CMS

I want to learn OOP and I am creating a little CMS for practice and to use it as a base for other projects in the future. This is the complete code: GitHub My major concerns are code structure, ...
1
vote
1answer
74 views

License Manager

I recently created a license manager for my publicly released project and I just wondered how I could improve it. ...
6
votes
1answer
82 views

Preventing XSS attacks in a Spring MVC application controller

One of the URL in my application is vulnerable to XSS attack, so I am handling it in the below way. I created a util class: ...
5
votes
3answers
173 views

Web server to switch GPIO pin

I am running a simple Python webserver to toggle a GPIO pin on a Raspberry Pi. All seems to work well, but I have a few questions about my code (see below). I am using the ...
5
votes
1answer
92 views

Php Login Class - Security and Logic check

I write a simple php login class that only operate on php sessions to login user in the system. My Question is that this class is secure enough to be used on production environment ? NOTE : Die ...
14
votes
3answers
683 views

Simple password generator

Here is a simple password generator in Java: ...
2
votes
1answer
26 views

Google oAuth Angular service

I wrote a module with 3 services that execute the oauth (and set the api key) for the google api and return the token object if the promise is positive. Here is the whole working module: ...
1
vote
1answer
96 views

PHP e-mail form with ReCAPTCHA

I want to ask if you can review the code for a simple contact form and the PHP code which sends me an email once a visitor fills the form and is validated through Recaptcha On my index.php file here ...
0
votes
1answer
66 views

Password encrypt & check

When a user registers (creates a new account), I want to encrypt password before storing in a database, and when a user logs on (with username & password) I want to check password. I did it in the ...
2
votes
2answers
122 views

Forgotten password / password reset

I have hand-coded a forgotten-password reset system. I am apprehensive about security issues/vulnerabilities. What part of this can be exploited or could be made more secure? forgot-password.php ...
2
votes
1answer
57 views

Security of login form using prepared statements

I've prepared a simple login form, using prepared statements to prevent SQL injections. How secure is this ? ...
1
vote
1answer
52 views

Safe Login Standards [closed]

I'm really trying to wrap my head around application safety in some web pages. I'd like to mention some of the things I've done in the past and hear some critiques on how I can get better. ...
4
votes
2answers
115 views

BouncyCastle Diffie Hellman

I want to write a complete diffie Hellman example for bouncy castle that includes key generation, key exchange, encryption, and decryption. I also want to verify that if Alice is initiating a ...
2
votes
1answer
85 views

Registration, Validation & Storage functions

The last time I wrote any serious code was the 90's, so a lot has changed and I am finding I am having to relearn pretty much everything. I have leaned a lot from previous posts and this is the ...
6
votes
2answers
381 views

PHP login based on a password parameter

I'm learning PHP now, and I'm trying to find out whether or not the following code structure has any faults: ...
1
vote
0answers
38 views

Hopefully secure post love counter

Is my nonce implementation secure? I'm trying to learn security on wordpress->ajax (and later woocommerce) and with wp_create_nonce. After much struggling I managed ...
1
vote
0answers
39 views

Sanitization and phpmailer security

I'm trying to set up a contact form using phpmailer. Are there any security holes in my code? I want to be sure as I feel there might be some kinda exploit I may not be aware of. ...
2
votes
1answer
94 views

Login/registration part of an Android application

I made some PHP files for the login/registration part of my Android application and I would like to know if it can be made safer. config.php: ...
1
vote
3answers
84 views

Registration and Login System for Application

I am developing a social platform and currently just completed the registration and login PHP pages. The application is an android application that authenticates against a MySQL DB. I am seeking ...
2
votes
0answers
25 views

CF/jQ server-side session struct to replace hidden inputs

I have inherited a legacy ColdFusion app with gobs of <input type="hidden"> fields, and a user finally may have used F12/Inspect Element to submit a ...
2
votes
1answer
75 views

Basic contact form

This code processes a basic contact form with a name, email and message. It also asks for a code to be typed in. The data is then transformed to avoid malicious placing of HTML script on the server, ...
1
vote
2answers
47 views

Securing a web service without relying on native authentication schemes

Due to various business and technical circumstances, I have to create an internet-facing .NET 4.5 WCF web service which should be called only by a certain party while not using native authentication ...
3
votes
3answers
186 views

Hacking a SecureString based on std::basic_string for C++

Inspired by reading "How-to write a password-safe class?", I tried some clever (or dumb-fool) hack to create a widely-useable secure string using the ...
6
votes
2answers
225 views

Converting a SecureString to a byte array

Does it allocates something that hasn't freed? Something that remains in memory? Except result byte array, ofc. ...
2
votes
1answer
30 views

Server that accepts HTML and PHP requests

For the Harvard cs50x MOOC I have completed an assignment in which a C server framework that functions like a barebones apache server is provided, to be finished by the student. The below code will ...
4
votes
1answer
99 views

Checking locked users using Identity 2.0

I'm writing a theoretical MVC application to aid in learning more about ASP Identity 2. In real terms I'm new to ASP Identity as a whole but thought I'd jump in in this release as it's the default ...
5
votes
2answers
98 views

User auth class and security

Just curious if my authentication is secure enough, really. Also wondering if I should ditch the secret variable and just use ...
2
votes
2answers
59 views

Encypt XML file with AES and storing on disk

I have written some code to encrypt XML and then store it on the disk. I want to be sure that the encryption code is secure, so here is the code: ...
2
votes
1answer
111 views

Secure array encryption and decryption

I have written the below class which encrypts and decrypts a PHP array. The encrypted data and the hash are sent over an insecure connection and I would appreciate if you could check the code for any ...
1
vote
1answer
63 views

Passwords storage class

I'm writing a tool, to manage our application, specifically to store passwords in encrypted view. I made a class which is based on two posts: ...
2
votes
0answers
36 views

Unsafe Node.js code, though in a trusted environment

I am going to run a private Node.js app in a local network which will take user code submissions and evaluate them. Since it is a trusted environment (just friends), I have not bothered at all about ...
1
vote
1answer
88 views

Retrieving objects from JSON URLs

This is an accounting program (and my first attempt at a web app of any kind) where users need to get and retrieve objects from different JSON URLs and at different levels. Rails is used for the back. ...
3
votes
2answers
824 views

Hashing passwords in PHP

When hashing a password, I understand it is best not to use functions such as SHA1 or MD5. This function is working fine and I want to know if it can be improved to increase site security. ...
6
votes
1answer
96 views

Password building and verification

I'm building a library for myself to use to store user passwords. The library itself shouldn't do the retrieval of data, but it should provide container classes for the data. I would like to know ...
8
votes
1answer
173 views

Encrypting a binary stream with RSA + AES in counter mode

I'm writing a little script that encrypts a file using the user's SSH identity. I read the RSA private key from ~/.ssh/id_rsa (default) Use the private key to ...