Skip to content

Many bad symmetric cryptography implementations in include/crypto.php #1655

@paragonie-scott

Description

@paragonie-scott

https://github.com/friendica/friendica/blob/master/include/crypto.php#L189-L212

  • ECB mode
  • I don't even know what is going on with that $ky loop. You're xoring it with null bytes so it literally does nothing.
  • Code duplication
  • Unauthenticated encryption

https://github.com/friendica/friendica/blob/master/include/crypto.php#L229-L245

  • NULL IV for CBC mode, when MCRYPT_DEV_URANDOM was being used for ECB mode? (It gets discarded in ECB mode, but you NEED an unpredictable and random IV for CBC mode.)
  • Unauthenticated encryption

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions